my @array; # this an array to store the good arguments for (@ARGV) { # for the argumets array if (-e) { # if the file exists push @array, $_;# push the file that exists onto the @array # why use $_ here? next; # what purpose has this } warn qq{"$_" doesn't exist!}; } @ARGV = @array;