in reply to url escape

"#output: name=josh&age=26"

I get

name

Take another look at the documentation, uri_escape expects a string. Had you provided:

my $str = '(name=>"josh",age=>26)'; print uri_escape( $str );

The output would be:

%28name%3D%3E%22josh%22%2Cage%3D%3E26%29

Replies are listed 'Best First'.
Re^2: url escape
by bigup401 (Pilgrim) on Apr 22, 2015 at 12:41 UTC

    cool, i got it bt why the output is %28name%3D%3E%22josh%22%2Cage%3D%3E26%29

    why not name=josh&age=26

      Because that is what you asked for. %28 is (, %29 is ). If you do not do so, &age= is illegal in HTML. You'd want &age= there.


      Enjoy, Have FUN! H.Merijn
      A reply falls below the community's threshold of quality. You may see it by logging in.