Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

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

by dakkar (Hermit)
on Feb 09, 2003 at 13:10 UTC ( #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? | Other CB clients
Other Users?
Others about the Monastery: (4)
As of 2022-05-16 19:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (63 votes). Check out past polls.

    Notices?