I have two text files I would like to open and read at the same time. Whats the best way to do this?
I was think along these lines: open (TESTFILE, <"somefile.txt")|| die "can not open file"; open (LOGFILE, <"my_other_file")|| die "can not open other file"; while (($line1 = <TESTFILE>) & ($line2 = <LOGFILE>)) { # print the line from each file print "$line1\n $line2\n"; } close TESTFILE; close LOGFILE; I know the while statement is wrong, Whats the best way, and most understandable way? and is there a way to do this without loading a module? Thanks Denis -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>