Franki wrote:
>
> Hi all,
>
> I have a problem I was hoping someone could help me with,
>
> I have this loop:
use URI::Escape;
> foreach $tag ( sort ( keys %form ) )
> {
>
> $redirect .= "&" . $tag . "=" . $form{ $tag };
> }
> # Now re-direct the browser
> print "Location: $redirect\n\n";
my $url = uri_escape ($redirect);
print "Location: $url\n\n";
> Basically, it is creating a post url with all the keypairs in it..
>
> I need to add a line or two to it, to check the values, and if they contain
> any spaces.. to swap the spaces to something like
> %20 so that the spaces don't cause everything after the first one to be
> ignored and not added to the url...
>
> Think I am alittle over my head here, I am still new to this.... but I am
> guessing that I need to add a line above:
> $redirect .= "&" . $tag . "=" . $form{ $tag };
> something to take $form{ $tag } check if it contains spaces " ", and if so,
> replace them with "%20"
>
> just not sure how to test the string for spaces anywhere, I think I might
> know the replace method though..
--
,-/- __ _ _ $Bill Luebkert ICQ=14439852
(_/ / ) // // DBE Collectibles Mailto:[EMAIL PROTECTED]
/ ) /--< o // // http://dbecoll.webjump.com/ (Free Perl site)
-/-' /___/_<_</_</_ Castle of Medieval Myth & Magic http://www.todbe.com/
_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web