Looking at the code, it isn't instantly clear what you expect the keys and values to be. A case can be make for either of ( "John" => 20, "Bill" => 34 ... ) or ( "John 20" => ?, "Bill 34" => ?, ... ) To help your readers figure out your intent, it helps to give variables clear names. %hash_list is not a clear name. If you intend to map names to ages, %name_to_age is a decent choice. If you intend to count name+age strings, %name_and_age_count would reveal your intention unambiguously.
In reply to Re: Keys/Values being lost with this code--any help?
by dws
in thread Keys/Values being lost with this code--any help?
by ByteOrNybble
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |