sub msg {
push @msgs, $_[0];
}
-sub notes {
+sub note {
push @notes, [ @_ ];
}
sub print_errors {
sub print_notes {
foreach (@notes) {
my ( $title, $note ) = @$_;
- my $str = "";
+ print '<div style="border: solid thin black; background-color: #ccf">';
if ($note) {
- $str .= "<h2 class=\"pred\">$title</h2>";
+ print "<h2 class=\"pred\">$title</h2>";
} else {
$note = $title;
}
- $str .= "<p>$note</p>";
- return $str;
+ print "<p>$note</p></div>";
}
}