From: Ramprasad A Padmanabhan <[EMAIL PROTECTED]>
> Jenda Krynicky wrote:
> > From: Ramprasad A Padmanabhan <[EMAIL PROTECTED]>
> > 
> >>I am passing a query string to a cgi script thru a perl program like
> >>    /cgi-bin/myprog?name=ram&comment=how's you
> >>
> >>Is there any simple module that will convert it into a proper query
> >>string like
> >>   /cgi-bin/myprog?name=ram&comment=how%27s+you
> > 
> > 
> > take a look at CGI::Enurl : http://Jenda.Krynicky.cz/#CGI::Enurl
> > 
> > Jenda=========== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz
> > ========== When it comes to wine, women and song, wizards are
> > allowed to get drunk and croon as much as they like.        -- Terry
> > Pratchett in Sourcery
> > 
> I looked at CGI::Enurl  but there is a problem ( I think I will have
> to live with it )
> 
> Even the '&' is encoded
> 
> me=ram&comment=how's you
> me=ram%26comment=how%27s+you

It's because you should encode the values BEFORE you join them with 
the '&'. The prefered use of CGI::Enurl is:

        $url = 'http://www.something.com/script.pl?' 
                . enurl {me => 'ram', comment => "how's you"};

That is ... give enurl() the hash with the data and leave the rest to 
it.

Jenda=========== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz 
==========
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
        -- Terry Pratchett in Sourcery


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to