vsespb has asked for the wisdom of the Perl Monks concerning the following question:
In continue of this http://www.perlmonks.org/?node_id=1017390 discussion
this does not work. good. but thismy $a = 1; my $b = 2; $a && $b = 3;
prints 3 (because $x aliased as 1-st arg to subrouting), so $x && $y works as lvalue. I wonder why so ? I didn't find documentation for this (not in perlsub/perlop)use strict; use warnings; sub a { $_[0] = 3; } my $x = 0; my $y = 5; a($x && $y); print "$x\n";
|
---|
Back to
Seekers of Perl Wisdom