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

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

Thread Previous | Thread Next
Ricardo Signes
January 3, 2012 09:49
Re: defined(@arr), defined (%hash)
Message ID:
* Eirik Berg Hanssen <> [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.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About