if ($#ARGV != 0) { die " no argument was passed\n"; } #### system( '/path/to/perl', '/path/to/script2.pl', @theArray) and die $?, $!;