in reply to substitution of illegal chars in filename

Check out URI::Escape's uri_unescape() method. However, before you go slamming this into a -pi -e oneliner, consider using an HTML Parser instead. (If you only want to change, say, <a> or <img> tags.)

UPDATE:
Hmmm, now i see what you mean in your last paragraph. You want to change the filename referenced in some (HTML?) document AND you want to change that file's name as well? If so, you will need to keep track of the offending files you find (in a hash) and after you have finished cleansing the document, you can then iterate through the hash and use something like rename to change the name. Hope this helps. :)

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)
  • Comment on Re: substitution of illegal chars in filename

Replies are listed 'Best First'.
Re: Re: substitution of illegal chars in filename
by lahf (Initiate) on Oct 04, 2003 at 14:12 UTC
    Wow, I am severely out of my depth now! Cool paradiddles, in 6/4 time no less