in reply to Re^2: Incorrect warning when using hash slices?
in thread Incorrect warning when using hash slices?
I'm wondering if this relates to perl having difficulty distinguishing between the qw## operator versus a bare hash key that looks like qw##.
B::Deparse to the rescue:
$ perl -MO=Deparse -wE '$foo{a}=1; $foo{b}=2; say join",", @foo{qw#a b +#}' BEGIN { $^W = 1; } BEGIN { $^H{'feature_unicode'} = q(1); $^H{'feature_say'} = q(1); $^H{'feature_state'} = q(1); $^H{'feature_switch'} = q(1); } $foo{'a'} = 1; $foo{'b'} = 2; say join(',', @foo{'a', 'b'}); -e syntax OK
So it deparses correctly to @foo{'a', 'b'}
When I used / instead of # as a delimiter, I get the same deparse, and no warning on running. So I don't see parsing issues as the reason for this bug.
|
|---|