elsif(($#ARGV+1) < 1) { #### elsif ($#ARGV < 0) { #### elsif (@ARGV < 1) { # or, if you prefer an explicitly stated scalar context: elsif (scalar @ARGV < 1) { #### if(! -e "$Dir") { #### use strict; use warnings; die "Please supply an argument to the program" if @ARGV < 1; my $dir = shift; die "Please try again with a valid directory.\n" unless -d $dir; # Change to user selected location chdir $dir; mkdir "FirstSubDir"; mkdir "SecondSubDir";