>>>>> "Fliptop" == Fliptop  <[EMAIL PROTECTED]> writes:

Fliptop> so that only leaves one question:  how would you encode something like
Fliptop> this:

Fliptop> name=fliptop
Fliptop> company=at&t

Fliptop> ?

Fliptop> <a href="/cgi-bin/script.cgi?name=fliptop&amp;company=at&t">Click
Fliptop> here</a>

Fliptop> name: fliptop
Fliptop> company: at
Fliptop> t: 

Fliptop> nope.  how about this:

Fliptop> <a href="/cgi-bin/script.cgi?name=fliptop&amp;company=at%26t">Click
Fliptop> here</a>

Fliptop> name: fliptop
Fliptop> company: at&t

Fliptop> ah ha!  i hope this settles this discussion.

And I wouldn't have worked even that hard:

    use URI; use HTML::Entities;
    my $uri = URI->new("http://cgi-bin/script";);
    $uri->query_form( name => "fliptop", company => "at&t" );
    print encode_entities($uri->as_string);

==>

    http://cgi-bin/script?name=fliptop&amp;company=at%26t

Bingo.  Works correctly every time.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

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

Reply via email to