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.

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.
    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'