> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Subject: Comparing to many possibles
>
> Greetings;
> 
> Is there some perl shorthand that will make it easier to say
> 
>       if ( $x eq 'X' || $x eq 'Y' || $x eq 'Z' )
> 

This should do what you want:
     if ($x =~ /^[XYZ]$/)

Hope this helps...
Jason


CONFIDENTIALITY NOTICE:

************************************************************************

The information contained in this ELECTRONIC MAIL transmission
is confidential.  It may also be privileged work product or proprietary
information. This information is intended for the exclusive use of the
addressee(s).  If you are not the intended recipient, you are hereby
notified that any use, disclosure, dissemination, distribution [other
than to the addressee(s)], copying or taking of any action because
of this information is strictly prohibited.

************************************************************************

Reply via email to