develooper Front page | perl.perl5.porters | Postings from January 2012

Re: defined(@arr), defined (%hash)

Thread Previous | Thread Next
From:
Ricardo Signes
Date:
January 3, 2012 09:49
Subject:
Re: defined(@arr), defined (%hash)
Message ID:
20120103174919.GA15523@cancer.codesimply.com
* Eirik Berg Hanssen <Eirik-Berg.Hanssen@allverden.no> [2012-01-03T11:51:01]
> Defined imposes scalar context, and list assignment in scalar context
> "returns the number of elements produced by the expression on the right
> hand side of the assignment."

C<defined> does not really impose scalar context as usually understood.  For
example, defined(&foo) does not call foo in scalar context.  It is its own
thing, which is, basically, the problem.

-- 
rjbs

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About