(Top) < print() considered harmful | Generating HTML output > |
2 easy mistakes to make with regards to the output string:
sub start { # .... $output .= $webapp->drink_type_form; $output = $query->end_html; return $output; } |
$output now only equals end_html().
Beware using '=' when you want '.='
Also, ',' when you want '.' is a problem:
$output .= "a", "b", "c", "d"; # Perl will treat this as: ($output .= "a"), "b", "c", "d"; |
(Using templates will minimize this risk...)
CGI::Application (v.2.0) |
18 |