in reply to Re: Data::Rmap to modify an arrayref of arrayrefs
in thread Data::Rmap to modify an arrayref of arrayrefs

Why:

} else { $_ = $_;

which does nothing, and why:

my $newdata = [ shopping => \@item ]; $_ = $newdata;

when you could just:

$_ = [ shopping => \@item ];

or maybe even:

$_ = [shopping => [map {[item => $_]} qw(bread butter beans)]];

for the whole if block.

True laziness is hard work