RE: how to concat files easily?

2003-03-11 Thread Peter_Farrar
use File::Slurp $file1 = read_file($fileone); $file2 = read_file($filetwo); write_file($filenew,$file1\n$file2) Thanks Dan, It's that easy! -Peter -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: how to concat files easily?

2003-03-11 Thread Dan Muey
use File::Slurp $file1 = read_file($fileone); $file2 = read_file($filetwo); write_file($filenew,$file1\n$file2) Thanks Dan, No problem! File::Slurp is one handy bugger! It's that easy! -Peter -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

Re: how to concat files easily?

2003-03-11 Thread R. Joseph Newton
[EMAIL PROTECTED] wrote: use File::Slurp $file1 = read_file($fileone); $file2 = read_file($filetwo); write_file($filenew,$file1\n$file2) Thanks Dan, It's that easy! -Peter Even easier. There is no need to ever read file1. File 2 can be written to it in append mode simply by

Re: how to concat files easily?

2003-03-10 Thread Aimal Pashtoonmal
Hi, I am not sure if it is what you want, but why not do it on the command line with the cat command? or may be use this oneliner perl -e '{print `cat *.infiles`}' out_file or something similar. May be you could capture what you want using backticks and the above within your perl script. hope

RE: how to concat files easily?

2003-03-10 Thread Dan Muey
Hi All, Sorry if this is a stupid question. It took me awhile to figure out I could use the File::Copy module to copy a file, and this is about the same level of ignorance. Is there an easy way to concatenate two (text) files in Perl, short of opening two to read and one to write

Re: how to concat files easily?

2003-03-10 Thread John W. Krahn
Peter Farrar wrote: Sorry if this is a stupid question. It took me awhile to figure out I could use the File::Copy module to copy a file, and this is about the same level of ignorance. Is there an easy way to concatenate two (text) files in Perl, short of opening two to read and one to

Re: how to concat files easily?

2003-03-10 Thread R. Joseph Newton
[EMAIL PROTECTED] wrote: Hi All, Sorry if this is a stupid question. It took me awhile to figure out I could use the File::Copy module to copy a file, and this is about the same level of ignorance. Is there an easy way to concatenate two (text) files in Perl, short of opening two to read

Re: how to concat files easily?

2003-03-10 Thread R. Joseph Newton
[EMAIL PROTECTED] wrote: Hi All, Sorry if this is a stupid question. It took me awhile to figure out I could use the File::Copy module to copy a file, and this is about the same level of ignorance. Is there an easy way to concatenate two (text) files in Perl, short of opening two to read