2009. 11. 11. 15:28
Perl로 urlendode, urldecode 함수 구현2 PERL2009. 11. 11. 15:28
sub urlencode { my $str = shift; $str =~ s/([^A-Za-z0-9])/sprintf("%%%02X", ord($1))/seg; return $str; } sub urldecode { my $str = shift; $str =~ s/%([A-Fa-f0-9]{2})/pack('C', hex($1))/seg; return $str; } |