Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

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
Replies are listed 'Best First'.
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.

    "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?

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (11)
As of 2015-10-08 20:40 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (226 votes), past polls