It's a Bad Idea to mix languages in a program. You have CSS inside HTML inside Perl ... it would make your life a lot easier to separate them out. Please look at Template::Tiny or another templating engine.
At the very least, create your own package to contain all that HTML-producing code, or at the very very least, put the code in subs so the HTML is removed from your main program flow. E.g.:
while (my @row = $sth->fetchrow_array) { print ivr_call( $row[5] ); print non_outage_call( $row[6] ); } sub ivr_call { my $checked = shift eq '1' ? 'checked' : ''; return "<td><form><input type='checkbox' name='ivr_call' value='1' $ +checked>IVR Call Volume</form></td>"; } sub non_outage_call { my $checked = shift eq '1' ? 'checked' : ''; return "<td><form><input type='checkbox' name='non_outage_call' valu +e='1' $checked>Non-Outage Call Volume</form></td>"; }
In reply to Re: Can we use print <<HTML; twice in same file?
by 1nickt
in thread [Solved]: Can we use print <<HTML; twice in same file?
by Perl300
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |