in reply to Hash Problem
my %pal; while ( <FILE> ) { chomp; my ($key, $val) = split /,/ , $_, 2; $pal{$key} = $val; if ( $val eq $my_item ) { # some code } } [download]
Update Added code to address testing values secondary question