Re: merge 2 or more files together without creating new file
- From: shawnhcorey@xxxxxxxx ("Mr. Shawn H. Corey")
- Date: Fri, 31 Oct 2008 14:53:03 -0400
On Fri, 2008-10-31 at 10:27 -0700, slow_leaner wrote:
Hi,
Is there a way I can marge FILE2 into FILE1 or reverse together
without creating a new merge file. I am not sure there are a better
way to do it. If you give me some hint or help, i would appreciate
it.
thx.
Here is my code.
#!/bin/usr/perl
open(FILE1, /usr/test1.txt);
@temp =<FILE1>;
close (FILE1);
open(FILE2, /usr/test2.txt);
@temp =<FILE2>;
close (FILE2);
If you just want to append the second file to the first:
push @temp, <FILE2>;
--
Just my 0.00000002 million dollars worth,
Shawn
The map is not the territory,
the dossier is not the person,
the model is not reality,
and the universe is indifferent to your beliefs.
.
- References:
- merge 2 or more files together without creating new file
- From: Slow_leaner
- merge 2 or more files together without creating new file
- Prev by Date: Re: Why doesn't this work: perl -e "@s=([1,2],[3,4]); print $s[0][0];"
- Next by Date: Why is my regex so slow?
- Previous by thread: merge 2 or more files together without creating new file
- Next by thread: Why doesn't this work: perl -e "@s=([1,2],[3,4]); print $s[0][0];"
- Index(es):