note
monktim
<code>
#in my calling script
my @array = ('a','b','c');
system(qq(perl C:\\script2.pl @array));
print "system failed. [$?]: $!" if ($?);
#if args contain spaces
my @array = ('a 1','b 2','c 3');
my $args;
$args .= '"'.$_.'" ' foreach (@array);
system(qq/perl C:\\Backup\\script2.pl $args/);
print "system failed. [$?]: $!" if ($?);
# Script2.pl
my @RecivedArray = @ARGV;;
print join(',',@RecivedArray);
</code>
<b>Update</b> Added a line of code to check the status of the <i>system</i> call. Also added a block showing arguments that contain spaces.
324792
324792