- or download this
#!/usr/bin/perl
use warnings;
...
for ( keys %newhash ) {
print "$_ => ", $newhash{$_}, "\n";
}
- or download this
C:\Code>perl newkeys.pl
22 => Bbbb
11 => Aaaa
33 => Cccc
- or download this
%hash = map { substr ($_, 2) => $hash{$_} } keys %hash;