in reply to apostrophes and security

But these (for a true apostrophe) fail completely:
$_value =~ s/’/’/g; # typed from keyboard $_value =~ s/%92/’/g; # uri encoding $_value =~ s/’/’/g; # should never work
Try: $_value =~ s/\x92/’/g; though I'm surprised your first didn't work.

Replies are listed 'Best First'.
Re^2: apostrophes and security
by deadnancy (Novice) on Aug 15, 2005 at 19:31 UTC
    YES!

    Exactly what I was looking for! It just never occurred to me to look into how perl deals with hex despite URI encoding being all about it...

    THANK YOU!

    DN