perl URLencode URLdecode的方法

来源:互联网 发布:一叶而知 编辑:程序博客网 时间:2024/05/22 13:23
<pre name="code" class="html">一个perl URLencode URLdecode的方法这是url的uri_escape和uri_unescape,不是针对html的#引入模块use URI::Escape;#urlencode$encoded = uri_escape("10% is enough\n"); #urldecode$decoded  = uri_unescape($encoded);jrhmpt01:/root/wx# cat s3.pl use URI::Escape;$encoded=uri_escape('@crypt_597aeefd_10918236aa7c541a78a1b25880eeb1cb');print "\$encoded is $encoded\n";jrhmpt01:/root/wx# perl s3.pl $encoded is %40crypt_597aeefd_10918236aa7c541a78a1b25880eeb1cb


                                             
0 0