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!
In reply to RE: Merging files
by chromatic
in thread Merging files
by ANKUR
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |