use strict; use warnings; use English; print "Usage: $0 output input1 input2 ...\n"; my $outfile = shift @ARGV; open(OUT, ">$outfile") || die "Can't open $outfile for writing: $!\n"; my @infile; foreach (@ARGV) { open(IN, $_) || die "can't open $_ for reading: $!\n"; push @infile, \*IN; } foreach(@infile){ my $i = <$_>; print "Got: $i"; }