First, Juerd is right - you need to properly quote the text contained in $name, and one way to do that is to use URI::Escape.
Second, for this specific issue, you could get away with simply surrounding $name in the redirect with double quotes, like this:
Third, also as Juerd pointed out, and since you've already "use"d CGI, you could use the CGI 'escape' and 'unescape' functions. Read about those either in Lincoln Stein's book 'Official Guide to Programming With CGI.pm' p.199, or by reading the perldocs on the CGI.pm module by doingprint $query->redirect("http://webserver/action.asp?name=\"$name\"" +); OR print $query->redirect(qq!http://webserver/action.asp?name="$name"! +);
at a command prompt.perldoc CGI
HTH.
In reply to Re: Re: Passing value with two words or more
by hmerrill
in thread Passing value with two words or more
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |