Now you have a hash with the city names as keys and each corresponding digit included in an arrayref of values. This node has some good insight into working with these data structures.while(<DATA>){ ($city,$num)=split; push( @{$myhash{$city}}, $num ); }
In reply to Re: arrays or hashes
by insensate
in thread arrays or hashes
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |