in reply to Merging files
The while loop does the equivalent of your defined check.while ($line1 = <FILE1> && $line2 = <FILE2>) { print RESULT $line1, $line2; }
Update: merlyn points out that && is too high on the precedence scale to work. Use and instead. Also, this code is likely to fail if you hit a line of '0', as the loop actually does a truth-test. Thanks!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: RE: Merging files
by gumpu (Friar) on Aug 27, 2000 at 22:45 UTC |