in reply to Passing arguments

This logic is probably wrong:

if ($#ARGV != 0) { die " no argument was passed\n"; }
I think you want to test equality, and the 0 may be wrong. It might help sort this out if you eliminated the shell by calling the list form of system and checking errors, system( '/path/to/perl', '/path/to/script2.pl', @theArray) and die $?, $!;

After Compline,
Zaxo