in reply to Looping in a Loop

You didn't show us samples of the files, so I can only guess that end-of-line characters might be the problem.

You should chomp both read lines or alternatively @mylist and @myfile, but only chomping @temp looks strange.

If this doesn't help try Data::Dumper to inspect your data.

Cheers Rolf

(addicted to the Perl Programming Language and ☆☆☆☆ :)