in reply to Reading from a file

For efficiency's sake, you can avoid the "slurping" by using a while loop to consider 1 line at a time.
open... while (<file1>) { print; } close...
Brad