in reply to Re^3: How do you create a tab delimited txt file from two files?
in thread How do you create a tab delimited txt file from two files?
FWIW this can be written in Perl 6 very nicely:
$ perl6 -e 'for lines("a") Z lines("b") -> $a, $b { say "$a\t$b" }'
Where "a" and "b" are the names of the two files.
If the iteration should not stop after the second file is exhausted, we can pad the lines of the second file with an infinite number of empty strings:
$ perl6 -e 'for lines("a") Z lines("b"), '' xx * -> $a, $b { say "$a\t +$b" }'
Works with Rakudo today.
|
|---|