OK, so my sub to parse form contents is called at runtime. On *nix if there was no form data, the script just continued on its merry way. On IIs I am getting this error: Bad name after what_ever_var' (Note single quote haning there) I have tried parsing the form with this:
my %FORM = $q->Vars('topic','words','pass','textsize','topicsize','edit'); and my %FORM = map { $_, @{[ param($_) ]} > 1 ? [ param($_) ] : param($_) } param(); and my @labels = qw(topic words pass name textsize topicsize);
my %form = map { $_ => $q->param($_) } @labels;
Any advice?
TIA
jg
here is the sub:
sub parse_form {
my %FORM = map { $_, @{[ param($_) ]} > 1 ? [ param($_) ] : param(
+$_) } param();
$name = $q->param('name') || "Agenda";
$name =~ s/\s/_/g;
$words = $q->param('words');
$plain_words=$words;
$words =~ s/\r\n/<BR>/g;
while ($words=~ /<br>/gi ) {$line_break_count++}
$topic= $q->param('topic');
$textcolor = $q->param('textcolor');
$textsize = $q->param('textsize');
$topicsize = $q->param('topicsize');
$textface = $q->param('textface');
$user = $ENV{'REMOTE_ADDR'};
$pass = $q->param('pass');
$edit = $q->param('edit');
if ($edit eq "done") {
send_edit_form();
} elsif ($edit eq "yes") {
make_edit_form();
}
if ($line_break_count > $max_break_count) {
seperate_page()
}
}
_____________________________________________________If it gets a little bit out of hand sometimes, don't let it fool you into thinkin' you don't care.
TvZ
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.