next if $FILE =~ /^./; #### next if $FILE =~ /^\./; #### if(-d "$FILEPATH/$FILE"){ #Don't wanna have current directory and the one below next if $FILE =~ /^\./; push(@FILELIST,@{readin_directory(["$FILEPATH/$FILE"])}); }