in reply to Regex pattern to find directories only with digits
This will also find files with names consisting of digits only...
use strict; my @LOGDIR = <*>; foreach my $DIR(@LOGDIR) { if($DIR =~ m/^(\d+)$/){ print "$DIR\n"; } }
In Section
Seekers of Perl Wisdom