in reply to Hash Problem

Anonymous Monk,
Assuming there are no imbedded commas:
my %pal; while ( <FILE> ) { chomp; my ($key, $val) = split /,/ , $_, 2; $pal{$key} = $val; if ( $val eq $my_item ) { # some code } }
Cheers - L~R

Update Added code to address testing values secondary question