I’m getting this expected output
perl -MData::Dumper -e 'print Dumper do q(./dotest.pl)'
$VAR1 = [
1,
2,
3,
4
];
while dotest.pl
is
use strict;
use warnings;
my $x=1;
if ($x) {
my $ret = [
# map { my %h = (x => $_); %h }
1..4
];
}
sub foo { 1 }
However, when I uncomment the map transformation, the oneliner doesn’t output anything.
Is it a bug? perl is 5.34.0