"Robert" <> wrote in
news:YlnYe.539209$s54.79301@pd7tw2no:
> I'm building a small subroutine that will check many variables at once
> for certain matches and then take action based on it's results.
> Currently I am doing it like this:
>
> if ($name =~ /XXX/ || $email =~ /XXX/ || $inquiry =~ /XXX/ || $phone
> =~ /XXX/ || $comments =~ /XXX/) { &terminate; }
....
> For example (not real code):
>
> if ($name,$email,$inquiry,$phone,$comments =~ /XXX/) { &terminate; }
<UNTESTED>
for( $name, $email, $inquiry, $phone, $comments ) {
terminate if /XXX/;
}
</UNTESTED>
Sinan
--
A. Sinan Unur <>
(reverse each component and remove .invalid for email address)
comp.lang.perl.misc guidelines on the WWW:
http://mail.augustmail.com/~tadmc/cl...uidelines.html