all tasks
This commit is contained in:
parent
b83f433714
commit
68f8f3e56b
14735 changed files with 178959 additions and 0 deletions
8
Task/URL-decoding/Perl/url-decoding-1.pl
Normal file
8
Task/URL-decoding/Perl/url-decoding-1.pl
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
sub urldecode {
|
||||
my $s = shift;
|
||||
$s =~ tr/\+/ /;
|
||||
$s =~ s/\%([A-Fa-f0-9]{2})/pack('C', hex($1))/eg;
|
||||
return $s;
|
||||
}
|
||||
|
||||
print urldecode('http%3A%2F%2Ffoo+bar%2F')."\n";
|
||||
Loading…
Add table
Add a link
Reference in a new issue