Syntactic Confectionery Delight | |
PerlMonks |
Re: Please explain 'list' assignment.by Errto (Vicar) |
on Nov 03, 2006 at 19:11 UTC ( [id://582142]=note: print w/replies, xml ) | Need Help?? |
The way to do what you're looking for is
The reason your first piece of code doesn't do that is because it's a list assignment. That is, it takes a list of variables on the left side and a list of values on the right side. But the list on the left side has three items and the list on the right only has one, so the other two variables will get a value of undef.
In Section
Seekers of Perl Wisdom
|
|