Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Numerical Value question

by vinoth.ree (Monsignor)
on May 27, 2016 at 03:50 UTC ( #1164254=note: print w/replies, xml ) Need Help??


in reply to Numerical Value question

Hi,

Even you can use readdir() to each filename in folder. This code reads your folder and match for the word 160526GRAD-T with min 1 and max 3 digits after 'T'

#!/usr/bin/perl -w opendir(DIR, "/your folder path"); @files = grep(/160526GRAD-T\d{1,3}$/,readdir(DIR)); + closedir(DIR); foreach $file (@files) { print "$file\n"; }

All is well. I learn by answering your questions...

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2020-06-05 18:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you really want to know if there is extraterrestrial life?



    Results (40 votes). Check out past polls.

    Notices?