in reply to Passing Array to seperate file

or use the system command
system("otherscript.pl", @stringarray);
and otherscript.pl has to evaluate @ARGV

Replies are listed 'Best First'.
Re: Re: Passing Array to seperate file
by scottness (Initiate) on Mar 01, 2004 at 16:44 UTC
    ok I have a modified version of that code system(targetfile.pl, @array); how do I modify the "other files" open(HANDLE, final.txt) to now handle the array the same way as the final input since I was reading each $line of the file and then processing accordingly. Will $line pull each item in the array the same as the file way? Thanks
      the "targetfile.pl" now can do the following:
      foreach my $line (@ARGV) { print "$line\n"; # or do anything else with it }