go ahead... be a heretic | |
PerlMonks |
Re: @array[1] is valid??by CountZero (Bishop) |
on Aug 04, 2003 at 19:04 UTC ( [id://280766]=note: print w/replies, xml ) | Need Help?? |
$foo[1] returns you a scalar and @foo[1] returns you a one element list. If you do it in a context which is sensible to being in scalar or list context, it might bite you, hence the message given by warnings. CountZero "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law
In Section
Seekers of Perl Wisdom
|
|