| kruptof |
Aug 6th, 2006 4:57 PM |
Shorterning this code:
does anybody know hot to make this code shorter and more effecient:
:
$my_input = $ENV{QUERY_STRING};
$my_input=substr($my_input,9);
$my_input =~ s/%21/!/g;
$my_input =~ s/%22/"/g;
$my_input =~ s/%A3/£/g;
$my_input =~ s/%24/\$/g;
$my_input =~ s/%25/\%/g;
$my_input =~ s/%5E/^/g;
$my_input =~ s/%26/\&/g;
$my_input =~ s/%28/(/g;
$my_input =~ s/%29/)/g;
$my_input =~ s/%3D/=/g;
$my_input =~ s/%2B/+/g;
$my_input =~ s/%7B/{/g;
$my_input =~ s/%7D/}/g;
$my_input =~ s/%5B/[/g;
$my_input =~ s/%5D/]/g;
$my_input =~ s/%3A/:/g;
$my_input =~ s/%3B/;/g;
$my_input =~ s/%27/'/g;
$my_input =~ s/%23/\#/g;
$my_input =~ s/%7E/~/g;
$my_input =~ s/%7C/\|/g;
$my_input =~ s/%5C/\\/g;
$my_input =~ s/%3C/</g;
$my_input =~ s/%2C/,/g;
$my_input =~ s/%3E/>/g;
$my_input =~ s/%2F/\//g;
$my_input =~ s/%3F/?/g;
$my_input =~ s/%AC/¬/g;
$my_input =~ s/%60/`/g;
$my_input =~ s/\+/ /g;
$my_input =~ s/%0D%0A/<br>/g;
as you can see i am just trying decode the submission of a form. I thank you in advance for your replies.
|