in reply to Problem passing selected values to text file

The problem is that tha code you currently have to parse the form input
code: ---------------------------------------------------------------------- +---------- read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @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; $value =~ s/\n/ /g;# added to strip line breaks $FORM{$name} = $value; } ---------------------------------------------------------------------- +----------
does not handle multiple values. You should use the CGI module instead.
Replace the code above with code: --------------------------------------------------------------------------------
use CGI; my $cgi = CGI->new();
--------------------------------------------------------------------------------
Then anywhere you would use $FORM{'parameter'} instead use $cgi->param('parameter')
See http://www.perldoc.com/perl5.8.0/lib/CGI.html for more details.