in reply to Re: Map Function Weirdness
in thread Map Function Weirdness
and it will evaluate to the empty string
Not quite. The comparison operators and possibly all operators returns triplevar(0, 0.0, "") for false.
$ perl -wE'say 0 + (0 > 1)' 0 $ perl -wE'say 0 + ""' Argument "" isn't numeric in addition (+) at -e line 1. 0
which evaluates to $_ previously set to a hash value
Not quite. Scalar assignment evaluates to its LHS, so it evaluates to $max, not $_.
$ perl -E'$_ = 123; ++( $max = $_ ); say $max; say $_;' 124 123
Of course, they hold the same value at that point, and map promptly copies that value.
|
|---|