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"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Regex pattern to find directories only with digits
by Bindo (Acolyte) on Apr 11, 2013 at 11:22 UTC |