I've read through the POD for CGI.pm and I'm still confused on how to save the state of a form.
I've got the following code running at present. The checkboxes are being built from a hash table.
sub printboxes{ foreach my $key ( sort keys %list ){}; print header; print start_html('Comics Configuration Page'), start_form, $query->checkbox_group(-name=>'comics', -values=>[grep {!/html?$/} sort %list +], -columns=>3), submit(-name=>'Save my choices!'), end_form, br, print end_html; open FH, '>'.$file; $query->save('FH'); close FH; }
My assumption was, after reading the POD, that I could save the state of the form ( which boxes were checked ) but when I look at the file it produces, I've got one equals sign there, so it seems that it isn't picking up anything. I've also seen the filehandle written as 'FH', FH, and \*FH and have tried all these variants and still no luck.
If anybody can help with this I'd greatly appreciate it!
There is no emoticon for what I'm feeling now.
In reply to Saving state in cgi.pm question by Popcorn Dave
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |