Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: URL/URI encoding strings to go into query strings

by dakkar (Hermit)
on Feb 09, 2003 at 13:10 UTC ( [id://233889]=note: print w/replies, xml ) Need Help??


in reply to URL/URI encoding strings to go into query strings

Instead of URI::Escape, you can use URI::URL:

use URI::URL; my $u=URI::URL->new('/myscript.cgi'); $u->query_form(query=>q(what's up doc?), page => 2); print $u->as_string,"\n";

prints:

/myscript.cgi?query=what's+up+doc%3F&page=2
-- 
        dakkar - Mobilis in mobile

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://233889]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (None)
    As of 2024-04-25 01:53 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found