use strict; use warnings; # array choices my @ab = ("one", "two", "three"); my @cd = ("four", "five", "six"); my @ef = ("seven", "eight", "nine"); # Print contents of the chosen array foreach my $item (@{@ARGV[0..1]}) { print "$item\n"; } #### >perl test.plx a b one two three