Your skill will accomplish what the force of many cannot |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Back to Perl after a long, too long break!
I wish to make a csv data file (for R) and I have a series of files consisting of lists of single items.
Rather than open the first file, outputing the first line to a new (output) file then opening the second file, reading the first item and appending it to the first line of the output file and so on until I run out of input files then doing the same for the second line I'm sure there must be a more elegant way.
I know the files all have the same number of lines so don't need to worry about this.
Somehow I'm guessing the solution uses
while (<>) {} but not sure how to handle the handles (no pun intended!) Cheers Paul In reply to Opening multiple files by mcasspj
|
|