Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Help on Hashes

by hdb (Prior)
on May 14, 2014 at 07:35 UTC ( #1085986=note: print w/ replies, xml ) Need Help??


in reply to Help on Hashes

It is better to store your data in a hash of array (references) like this:

use strict; use warnings; my %COL_CHECK = ( A => [ qw( NAME CITY STATE ) ], B => [ qw( NAME CITY STATE COUNTY ) ], C => [ qw( NAME AGE STATE COUNTY ) ], D => [ qw( NAME AGE CITY STATE COUNTY ) ], E => [ qw( NAME AGE DESIGNATION CITY STATE COUNTY ) ] ); for my $key (@{$COL_CHECK{$ARGV[0]}}) { print "$key\n"; }


Comment on Re: Help on Hashes
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (12)
As of 2015-07-02 10:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (33 votes), past polls