in reply to print behavior
and figure out why this does print "00".my $x = 0; print "$x", $x++;
The reason for the difference is that on your case the first parameter is an alias to the variable $x, while in my case it's an expression with a stringified copy of the value of $x at the time the parameter value was evaluated.
An alias can still change its value later – when the value of $x changes. A copy can not.
|
|---|