in reply to Re: Multiple testing methods
in thread Multiple testing methods

I'd go with something similar to the above, but remove some stuff:
my $message = ''; if ( $char_keywords > 950 ) { $message = "You had $char_keywords chars. Max is 950"; } if ( failrepeattest() ) { $message .= '<br />' if $message; $message .= 'Repeated keyword error message.'; } if ( $message ) { print qq(<td><font color="red">Keywords: </font></td>); print qq(<td><font color="red">$message</font><br>); } else { print qq(<td>Keywords: </td>); }
You don't need the $error flag. The $message will be empty (false) if there are no errors. I've also taken out the length() check on $message for the same reason .. if the message has length then testing it in this context will return true and the <br> tag will be output.

Cheers!
Rick
If this is a root node: Before responding, please ensure your clue bit is set.
If this is a reply: This is a discussion group, not a helpdesk ... If the discussion happens to answer a question you've asked, that's incidental.