P is for Practical | |
PerlMonks |
Re: Mass file renamingby rruiz (Monk) |
on Jul 20, 2005 at 07:52 UTC ( [id://476401]=note: print w/replies, xml ) | Need Help?? |
Once you have the file name in a var like:
You can use either:
Or (as pointed by BrowserUK):
Just note that if your file name var contains the path to the file, and one of the directories in the path contains a similar name (ie. eleven consecutive digits, as in: '/tmp/0123456789019/22200010001.png'), you will have to modify the regexp to take it into account and the replacement part will/may not be so simple. HTH,
In Section
Seekers of Perl Wisdom
|
|