Greetings good people! I just want to find all the directories containig only numbers and assign them to an array. For an instance I would want isolate the directories in a certain partition with this format "20130411". Not "2013.kjh" or "NN.201304", or "2013mmkk04". Following is what I tried but they returns not only what i want but the ones with letters
my @LOGDIR = <*>; foreach my $DIR(@LOGDIR) { if($DIR =~ m/([\d])/){ print "$DIR\n"; } }
Please can someone help. Many thanks in advance.
Bindo
In reply to Regex pattern to find directories only with digits by Bindo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |