in reply to Why is +CONST left to a fat comma not treated as in $hash{+CONST}?

That's how the fat comma works: it turns the word to the left of itself into a string.
$ perl -MO=Deparse,-p -Mstrict -e 'sub b;sub c;(1+b=>c)' sub b; use strict; ((1 + 'b'), c()); sub c;

The behaviour can be sometimes surprising, but it's documented in perlop:

The special quoting behavior ignores precedence, and hence may apply to part of the left operand:
print time.shift => "bbb";
That example prints something like "1314363215shiftbbb", because the => implicitly quotes the "shift" immediately on its left, ignoring the fact that "time.shift" is the entire left operand.

Update: See also Using constants as hash keys.

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Replies are listed 'Best First'.
Re^2: Why is +CONST left to a fat comma not treated as in $hash{+CONST}?
by Darkwing (Scribe) on Jan 05, 2024 at 15:24 UTC
    Thanks, i see.