http://qs321.pair.com?node_id=1028263


in reply to Regex pattern to find directories only with digits

If I were trying to get just the entries in my current working directory whose names consist entirely of digits, I'd do it like this:
my @digit_dirs = grep /^\d+$/, <*>; print join( "\n", @digit_dirs, "" );
If the entries of interest were in fact all "yyyymmdd" digit strings, I'd replace the "+" in the grep regex with {8}.