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 reply to Re: Regex pattern to find directories only with digits
by hdb
in thread Regex pattern to find directories only with digits
by Bindo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |