- or download this
my %intByStr = populate();
my %strByInts; $strByInt{ intByStr{ $_ } } = $_ for keys %intByStr;
...
- or download this
$i=1; $intByStr{ $_ } = $i++ for 'aaaa'..'zzzz';;
...
print total_size( $_ ) for \(%intByStr, %strByInt);;
50805928
44297159
- or download this
undef %AbyB; $i=1; $AbyB{ $_ } = $i, $AbyB{ $i++ } = $_ for 'aaaa'..'
+zzzz';;
print total_size( \%AbyB );;
80479783