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

•Re: pass var in URL with spaces?

by merlyn (Sage)
on May 25, 2002 at 07:23 UTC ( [id://169250]=note: print w/replies, xml ) Need Help??


in reply to pass var in URL with spaces?

Well, let's see how to construct this the proper way:
use URI; my $u = URI->new("http://www.adomane.com"); $u->query_form(var => 'yes', var2 => 'yes and no', var3 => 'okay'); print $u->as_string;
which prints:
http://www.adomane.com?var=yes&var2=yes+and+no&var3=okay
Ahh, so that's the way to do it.

-- Randal L. Schwartz, Perl hacker

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (6)
As of 2024-09-16 22:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The PerlMonks site front end has:





    Results (22 votes). Check out past polls.

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.