Sihal has asked for the wisdom of the Perl Monks concerning the following question:

Fellow monks,

I am working on a wap interface: all the links in my wml card are in the form href="./op?op=x&param1=..." and the go to a perl handler which parses the args behind ?

My problem is that when I try to pass a parameter from an input field in my wml card that has whitespaces in it , the url behind the whitespace is ignored.
That is if my link looks like this : href="./op?op=X&param1=$(input_field)" and a whitespace happens to be in the variable $input_field, the part of the url behind the space is ignored.
Any workarounds? By the way, this is how I fetch the parameters from the url:
sub handler($$) { my ($self,$request) = @_ ; my $path = $request->request()->path_info; my $argv = $request->request()->args;

Replies are listed 'Best First'.
Re: passing parameters from a wml page to a mod_perl script.
by Sihal (Pilgrim) on Nov 27, 2002 at 11:43 UTC
    okay, here is the solution, it is purely a question of wml knowledge:
    You should precise that you want to escape the var in the wml, like this: $(input_var:e)
      BTW, I can't seem to find a func like unescape (something that does the oposite of escape) in CGI.pm. Any clues?