⭐ in reply to Can a hash name have the same value twice.
The appropriate perldoc pages are perldsc and perlref.my %data = ( 'US' => { Florida => 'Miami', Illinois => 'Chicago', New York => 'New York City' }, 'Canada' => { British Columbia => 'Alberta', Saskatchewan => 'Saskatoon', Ontario => 'Toronto' } );
(Oh, a hash is an associative array. That means that it takes the first element -- New York, for example -- and runs it through a hashing algorithm to generate a unique index, which helps it locate the key -- New York City -- in an internal data structure. If the hashing algorithm is good, "New York" will always come up with the same hash value, which is why duplicate keys are not very useful.)
|
|---|