|
|
| Perl: the Markov chain saw | |
| PerlMonks |
Re^3: Compare hash with arrays and printby Marshall (Canon) |
| on Jul 12, 2010 at 23:19 UTC ( [id://849125]=note: print w/replies, xml ) | Need Help?? |
|
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.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||