my $str = join('', ('a'..'p')); my %hash = map { $_ => $_ } split('',$str); # silly example of using the hash print $hash{j} . $hash{e} . $hash{f} . $hash{f} . $hash{a} . "\n";