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"; }
In reply to Re: Help on Hashes
by hdb
in thread Help on Hashes
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |