in reply to Problem passing selected values to text file
My problem was only to learn why the values I select from my form array are not making it into the text file as they should? The last choice I select is the only value being added to the list at this time.
Yes, because your CGI processing code is broken. It took me half a second to find the error (and in ten seconds, I found at least six other errors).
If you posted this code in your previous question (as your current question indicates), several people would have recommended you use the CGI module for fetching parameters from the user agent. use CGI or die explains the reasons why in sufficient detail.
If you just want working code, I suggest the following snippet will do what you really want to do instead:
use CGI; my $q = CGI->new(); my @choices = $q->param( 'choice' );
|
|---|