Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Numerical Value question

by vinoth.ree (Monsignor)
on May 27, 2016 at 03:50 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1164254]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2024-04-19 05:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found