Re: Removing "+" in $ENV{QUERY_STRING}



manojkumarg@xxxxxxxxxx wrote:
Hello List,

I am trying to build a webpage where I can enter hostname in a text box and up on hitting the key this searches multiple .csv files and prints them in the webpage itself. I am facing a problem with $ENV(QUERY_STRING} which take “+” when the textbox is entered with spaces in the beginning or end.

Tried to remove the starting and end spaces by s/^\s+// and s/\s+$// .Nothing works for me here. Am I doing any thing wrong here?

Can any one help me in removing the “+” in the printed value? Because of this “+” in the variable my search does not work.

Many people have already dealt with the problems of parsing the CGI environment variables. No need to re-invent that wheel :-)

Check out the 'CGI' module. The examples in the documentation will get you started very quickly.

$ perldoc CGI

- Justin

--
Justin Hawkins
justin@xxxxxxxxxxxxx
http://hawkins.id.au/~justin
.



Relevant Pages

  • incorrect identifier error with Oracle
    ... I'm using the Perl DBI to access a Oracle 9i db using a form generated ... I know the CGI is parsing the query from the textarea input properly ...
    (perl.dbi.users)
  • Re: Get Clients Windows Logon ID
    ... The question is about CGI environment variables and perl CGI.pm for that ... this is not server specific. ... then they able to access my perl program. ...
    (perl.beginners)