L
Larry
While we are on the subject of inelegancies ... what if I want to
assign the elements of @zam to scalars, but I don't care about
$zam[2]? I'd like to do:
my ($foo, $bar, undef, $baz) = @zam;
but that won't compile, so I'm forced to do:
my ($foo, $bar, $baz);
($foo, $bar, undef, $baz) = @zam;
Any better way?
And furthermore....
What if $foo and $baz are already my'ed... I'd like to do:
($foo, my $bar, $baz) = @wham;
but Perl doesn't like that either, so I have to do:
my $bar;
($foo, $bar, $baz) = @wham;
assign the elements of @zam to scalars, but I don't care about
$zam[2]? I'd like to do:
my ($foo, $bar, undef, $baz) = @zam;
but that won't compile, so I'm forced to do:
my ($foo, $bar, $baz);
($foo, $bar, undef, $baz) = @zam;
Any better way?
And furthermore....
What if $foo and $baz are already my'ed... I'd like to do:
($foo, my $bar, $baz) = @wham;
but Perl doesn't like that either, so I have to do:
my $bar;
($foo, $bar, $baz) = @wham;