in reply to Basic help with mapping
Note: Using the temporary "$x" allows the use of the "map" while preserving the original $AoH_orig, and getting the array ref (Hence the square brackets) containing the modified values.my $Aref_new =[ map {(my $x=$_->{'title'}) =~ s/ /_/g;$x } @$AoH_orig]; print Dumper(\$Aref_new);
"Man cannot live by bread alone...
He'd better have some goat cheese and wine to go with it!"
|
|---|