Perl tip: URL Decode and Encode 
Here's a quick perl tip on how to URL Decode and Encode:

To encode a string to be placed in a URL:

$string =~ s/([^A-Za-z0-9])/sprintf("%%%02X", ord($1))/seg;

To decode a URL-encoded string:

$string =~ s/\%([A-Fa-f0-9]{2})/pack('C', hex($1))/seg;


[ add comment ] ( 24026 views )   |  permalink
Bash Pitfalls 
Found this great Wiki on Bash Pitfalls today which should help avoid common bash scripting errors.

[ add comment ] ( 2636 views )   |  permalink

| 1 | 2 | 3 |