in reply to Re^2: Compare hash with arrays and print
in thread Compare hash with arrays and print

update: oops I do see that you do have a print statement. and looks like it should work.

This "select FILE3;" statement by itself does nothing useful. I actually wouldn't use select at all in this situation.

The Perl print statement is a "smart" critter. If the first arg of print is the file handle of some open file, Perl will print to that file handle. print FILE3 "abc"; will print "abc" to FILE3. The Perl default is essentially "print stdout "abc";". Select makes the default print go to wherever you want (instead of stdout), but here it appears easier to just put the file handle in the print statement.

print FILE3 $_; or similar will work fine. A plain "print;" sends $_ to the default file handle. With a file handle specified, I think you have to explicitly say $_ for the same effect.