Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Problem with a hash of hashes

by monktim (Friar)
on Aug 08, 2003 at 03:56 UTC ( [id://282103]=note: print w/replies, xml ) Need Help??


in reply to Problem with a hash of hashes

Here is a bare bones example of printing a hash of hases with your logic. Maybe you can build around this.
use strict; use warnings; my %locations = ( USA => { NY => '212', NJ => '973' }, ENG => { LDN => '44', CVT => '20' } ); foreach (keys %locations) { process_article(\%{$locations{$_}}); } sub process_article { my $hash = shift @_; print "$_ $hash->{$_}\n" foreach (keys %$hash); }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://282103]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2024-04-24 05:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found