This is somewhat like an extension to a question that I had posted earlier Array comparison using perl.
In my previous question I'd used arrays
my @arr1 = ('1','2','3','4','5','6','7','8','9');
my @arr2 = ('1','4','5','9','7');
and sought help to run a comparison between the two. But now my requirement has changed in a way that @arr1
is in one script say script1.pl
in another script say script2.pl
, both scripts found in the same directory.
I need to run the array comparison procedure (which was the solution to my former question) in script2.pl
and for this to occur @arr1
must be called into script2.pl
. It must be noted that the arrays do not contain predefined values as shown.
Please help me out with this wise Monks! Thanks!