$arg1 = $ARGV[0]; #### my $arg1 = shift @ARGV; #### $restargs = @ARGV; #### my @restargs = @ARGV[1..$#ARGV]; # An array of all the args except the first (uses array slice) my $restargs = "@ARGV"; # A string containing all the args concatenated together with spaces between them my $restargs = "@ARGV[1..$#ARGV]"; # As above excluding the first argument #### $restargs = ~s/$arg1 //g;