in reply to Declaring variables - is it legal to do this?
Yes, this is legal. Not very common, but legal. You could have found this out yourself by simply trying a small test. Example:
my ($name, $dept, undef, $status) = qw(one two three four); print "$name, $dept, $status\n"; __OUTPUT__ one, two, four
As you can see, the third element is lost.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Declaring variables - is it legal to do this?
by kiat (Vicar) on May 15, 2004 at 05:00 UTC | |
|
Re: Re: Declaring variables - is it legal to do this?
by Juerd (Abbot) on May 15, 2004 at 17:05 UTC | |
by Belgarion (Chaplain) on May 15, 2004 at 19:34 UTC | |
by TilRMan (Friar) on May 15, 2004 at 20:18 UTC |