in reply to Re: How do I join two files side by side?
in thread How do I join two files side by side?
#!/usr/bin/perl -w use strict; my ($string1, $string2); $/ = undef; open (FILE1, "< x") || die "Cannot open file : $!"; open (FILE2, "< y") || die "Cannot open file : $!"; open (FILE3, "> z") || die "Cannot open file : $!"; $string1 = <FILE1>; $string2 = <FILE2>; print FILE3 join('', $string1, $string2); close (FILE1); close (FILE2); close (FILE3);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Answer: How do I join two files?
by ysth (Canon) on Dec 14, 2004 at 10:48 UTC | |
by Mago (Parson) on Dec 21, 2004 at 12:48 UTC |