Works for mesub encode { $_ = join '', @_; s/(\W)/'%'.sprintf("%02lx",ord($1))/ge; return $_; } sub decode { $_ = join '', @_; s/%([a-fA-F\d][a-fA-F\d])/chr(hex($1))/ge; return $_; }
In reply to Re: URL escaping
by suaveant
in thread URL escaping
by thealienz1
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |