Do you know where your variables are? | |
PerlMonks |
Re^2: Why does the first $c evaluate to the incremented value in [$c, $c += $_] ?by linuxer (Curate) |
on Mar 04, 2014 at 23:18 UTC ( [id://1077005]=note: print w/replies, xml ) | Need Help?? |
Looks the same here, with Perl 5.18.1 on Linux: perl -MData::Dumper -E 'say join ", ", +$c,$c+=1 for 1..3'
perl -MData::Dumper -E 'say join ", ", --$c,$c+=1 for 1..3'
perl -MData::Dumper -E 'say join ", ", - -$c,$c+=1 for 1..3'
In Section
Seekers of Perl Wisdom
|
|