craazycanuck
Technical User
Hello everyone
I have a form with two text inputs....the difficulty I am running into is...I need to parse the spaces between words from the first text input but leave the spaces between words from the second text input.I am sure I need to adjust my regular expression but unclear as to how..Sorry for such a basic question .....just learning.
Ty in advance
Dave
whichmethod = $ENV{'REQUEST_METHOD'};
if($whichmethod eq "GET"{
$forminfo = $ENV{"QUERY_STRING"};
}else
{
$forminfo = <STDIN>;
}
@key_value_pairs = split(/&/,$forminfo);
foreach $pair (@key_value_pairs){
($key,$value) = split(/=/,$pair);
$value =~ s/\+//g;
$value =~ s/%([0-9a-fA-F][0-9a-fA-F])/pack("C", hex($1))/eg;
$FORM_DATA{$key} = $value;
}
}
I have a form with two text inputs....the difficulty I am running into is...I need to parse the spaces between words from the first text input but leave the spaces between words from the second text input.I am sure I need to adjust my regular expression but unclear as to how..Sorry for such a basic question .....just learning.
Ty in advance
Dave
whichmethod = $ENV{'REQUEST_METHOD'};
if($whichmethod eq "GET"{
$forminfo = $ENV{"QUERY_STRING"};
}else
{
$forminfo = <STDIN>;
}
@key_value_pairs = split(/&/,$forminfo);
foreach $pair (@key_value_pairs){
($key,$value) = split(/=/,$pair);
$value =~ s/\+//g;
$value =~ s/%([0-9a-fA-F][0-9a-fA-F])/pack("C", hex($1))/eg;
$FORM_DATA{$key} = $value;
}
}