URL Encode/Decode (Perl)
Snippet of Perl code to URL encode/decode a string…
URL Encode:
$str =~ s/([^A-Za-z0-9])/sprintf(“%%%02X”, ord($1))/seg;
URL Decode:
$str =~ s/\%([A-Fa-f0-9]{2})/pack(‘C’, hex($1))/seg;
Short URL for this post: http://tmblr.co/ZufQ6y18YIMv