In my perl script I have multiple arrays and I have to decide which array to choose while executing the script using $ARGV[] and then that array I have to use in an foreach statement.
I have tried :
@array_1 = ("abc", "home", "city");
@array_2 = ("state", "planet", "stars");
foreach my $string ($ARGV[0]) {
print "$string \n";
}
but this doesn't works as i need .