I think what you need here is an error flag. Do both tests, and if either fails, set the error falg to a true value, then do your print statments based on the value in the error flag. See Below:
my $error = 0; my $message = ''; if($char_keywords > 950){ $error++; $message = "You had $char_keywords chars. Max is 950"; } if(&failrepeattest()){ $error++; $message .= '<br />' if(length($message)); $message .= 'Repeated keyowrd error message.'; } if($error){ print qq(<td><font color="red">Keywords: </font></td>); print qq(<td><font color="red">$message</font><br>); }else{ print qq(<td>Keywords: </td>); }
In reply to Re: Multiple testing methods
by JediWizard
in thread Multiple testing methods
by sulfericacid
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |