in reply to Read and Combine Range of Two Files (was files)
Here is an example
You would call it like this 'myprog.pl outfile file1 file2 file3'#!/usr/local/bin/perl my $outfile = shift; # You have to use shift here for magic to work open (OUT, ">$outfile") || die $!; while (<>){ # This is magic, it opens all the files that are on @ARGV print OUT $_; } close (OUT);
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: files
by A_CAR11 (Initiate) on Jun 14, 2002 at 19:43 UTC | |
by SarahM (Monk) on Jun 14, 2002 at 20:21 UTC | |
by A_CAR11 (Initiate) on Jun 14, 2002 at 20:42 UTC |