open(PARTS, $partlist) || die "Can't open file: $!"; chomp(@PARTS = ); %hash_table = (@PARTS); #### foreach (keys %hash_table) { if ($_ eq $ordnum) { #do something } else { #do something else } }