Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Can I use a regex here?

by repson (Chaplain)
on Apr 17, 2001 at 05:49 UTC ( #73029=note: print w/ replies, xml ) Need Help??


in reply to Can I use a regex here?

Since the filenames follow a pattern, if the number of files is indeterminate or you perfer not to use the individual declarations shown above, you could do something like this:

rename $_, $OUT_DIR . "/allfiles/$_" for (glob 'pair*' . $RUN_NAME . '.log');

Alternately you could use opendir and readdir with a regex to check the filename instead using of shell-like globbing.


Comment on Re: Can I use a regex here?
Download Code
Re: Re: Can I use a regex here?
by mndoci (Scribe) on Apr 18, 2001 at 01:24 UTC
    This sounds good. My thinking is that since there is a pattern, I would like to use that in some way. Most of the suggestions to my earlier post sound good. However, if your suggestion works, it would be perfect.
    Thanks
    mndoci

    "What you do in this world is a matter of no consequence. The question is, what can you make people believe that you have done?"-Sherlock Holmes in 'A study in scarlet'

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (8)
As of 2014-07-25 01:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (167 votes), past polls