in reply to More regex's with hex's

Well, hex($title) will assume that C%3A%5CMy%20Documents%5CMy%20Pictures%5Cbodmin1.jpg is a hex number. What you want is
s/%([0-9a-fA-F][0-9a-fA-F])/pack("c",hex($1))/ge;

Of course, there are several modules, include URI::Escape module, doing the work for you.

Abigail