my @subdirectories = grep { not /^\.\.?$/ } grep { -d } glob("*"); #### my @files = grep { -f } glob("*");