CGIflustered
Technical User
Hi,
I have a form which submits some variables for processing to a HTML file. Here's how the script handles them:
# Split the name-value pairs
@pairs = split(/&/, $buffer);
foreach $pair (@pairs){
($name, $value) = split(/=/, $pair);
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$name =~ tr/+/ /;
$name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$FORM{$name} = $value;
}
The only problem is that one variable ("comment", a TEXTAREA input) has to have the carriage returns included for what I need. When I print out "comment" now, all lines are put together like one big sentence. How do I omit this one variable from stripping the carriage returns?
Thanks in advance,
Mark
I have a form which submits some variables for processing to a HTML file. Here's how the script handles them:
# Split the name-value pairs
@pairs = split(/&/, $buffer);
foreach $pair (@pairs){
($name, $value) = split(/=/, $pair);
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$name =~ tr/+/ /;
$name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$FORM{$name} = $value;
}
The only problem is that one variable ("comment", a TEXTAREA input) has to have the carriage returns included for what I need. When I print out "comment" now, all lines are put together like one big sentence. How do I omit this one variable from stripping the carriage returns?
Thanks in advance,
Mark