in reply to How to assign a hash from an array?
Also, using my inside the map means that you are declaring local versions of $key and $value that are different than the $key and $value you declare above, so you can't access them once you've left the map. You could replace your print statement with something like this, though:
print "$_ => $sorting{$_}\n" foreach keys %sorting;
(which will print all the information in the hash)
|
|---|