in reply to Scalar assignment question
I don't think you would be surprised at the result:my @fred = qw(42 43 44 45); my ($q, $x, $y, $z) = grep /\d+/, @fred; print "$q $x $y $z\n";
So $q is 42. Now remove $z:42 43 44 45
Now we get just 42 43 44That is $q has not changed. Now remove $y:($q, $x, $y) = grep /\d+/, @fred; print "$q $x $y\n";
and we get($q, $x) = grep /\d+/, @fred; print "$x\n";
$q still is unchanged. Finally remove $x:42 43
and $q is still:($q) = grep /\d+/, @fred; print "$q\n";
42
|
|---|