Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Regex pattern to find directories only with digits

by hdb (Monsignor)
on Apr 11, 2013 at 10:01 UTC ( [id://1028110]=note: print w/replies, xml ) Need Help??


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

    Thank you very much sir this is exactly what I was looking for. :)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1028110]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-04-25 17:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found