in reply to •Re: List assignment in scalar context
in thread List assignment in scalar context
my ($a,$b,$c); my $n1 = ($a,$b,$c) = split /,/, "1,2,3,4,5"; my $n2 = my @x = ($a,$b,$c) = split /,/, "1,2,3,4,5"; print "$n1 ... $n2\n"; ---- 4 ... 3
If it splits to one more, then why is that one going across one boundary, but not two?
Being right, does not endow the right to be rude; politeness costs nothing.
Being unknowing, is not the same as being stupid.
Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: List assignment in scalar context
by !1 (Hermit) on Jan 10, 2005 at 19:21 UTC | |
by dragonchild (Archbishop) on Jan 10, 2005 at 19:25 UTC | |
by !1 (Hermit) on Jan 10, 2005 at 19:32 UTC | |
by jonadab (Parson) on Jan 11, 2005 at 00:15 UTC | |
|
Re^3: List assignment in scalar context
by Aristotle (Chancellor) on Jan 10, 2005 at 22:35 UTC |