[Perl] append columns to file
My script copies stuff from one file to another. After the copy is done to the new file I want to append 2 new columns.
Currently it's copying a table from one file to another; eg. Quote:
Quote:
Code:
|
Hi,
I'm not sure what it is you want to do. - Is the new data also in a (separate) file? - Does the new data need to be appended to the end of the outfile ($nf in your case)? Also: I don't know if you are 'just playing around' with perl or have something else in mind, but there are easier ways to copy/append files. If you have a problem that needs to be solved, maybe you could tell us what you want to accomplish in the end. |
Quote:
Quote:
Quote:
|
Hi again,
Appending to an already existing file is not to hard: Code:
#!/usr/bin/perl -w This is just one way of doing what you ask. Depending on what you need to do with the lines from data1 and/or data2 other solutions could be better/faster. Here's a variation on the same script: Code:
#!/usr/bin/perl -w |
All times are GMT -5. The time now is 06:06 PM. |