#!perl # called as catFiles.pl input1 input2 > output exec( qw(perl -MExtUtils::Command -e cat), @ARGV ); #### #!perl -w # called as catFiles.pl output input1 input2 use strict; my ($output, @inputs) = @ARGV; exec("perl -MExtUtils::Command -e cat @inputs > $output");