in reply to Re: require problems
in thread require problems
Well, not really *that* criminal --
it's a non-empty list...
<INCORRECT>
lists in scalar/boolean context return the number of
their elements.
</INCORRECT>
Update: I humbly acknowledge the folly of the above statement.
Should be:
list assignment returns the number of elements.
End Update
Thus:
perl -e '$val = () = 0; print $val';
prints 1 -- true!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
NEVER a list in a scalar context -- PLEASE!
by merlyn (Sage) on Sep 19, 2000 at 22:24 UTC | |
|
RE: RE: Re: require problems
by Adam (Vicar) on Sep 19, 2000 at 22:31 UTC | |
|
RE: RE: Re: require problems
by japhy (Canon) on Sep 19, 2000 at 22:22 UTC |