Greetings,

I have an externally supplied attachment filename which I need to
untaint but still use. I'd like to replace any unsafe characters with
underscores. This is what I've tried:

$attach_name =~ s/[^\w\s\-\.]/_/;
$safe_attach_name = $1;

However, this isn't populating $safe_attach_name with anything. What am
I doing wrong?

Thanks in advance,
Damon




-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to