develooper Front page | perl.beginners | Postings from March 2002

RE: Comparing to many possibles

Thread Previous | Thread Next
From:
Nikola Janceski
Date:
March 4, 2002 09:52
Subject:
RE: Comparing to many possibles
Message ID:
1449413DA482D311B67000508B5A12F50592DE11@nyexchange01.summithq.com
if ( $x =~ /^(X|Y|Z)$/ ) # anyone got better?

-----Original Message-----
From: wix@eskimo.com [mailto:wix@eskimo.com]
Sent: Monday, March 04, 2002 2:34 PM
To: beginners@perl.org
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' )

TIA,
Dennis

-- 
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org

----------------------------------------------------------------------------
--------------------
The views and opinions expressed in this email message are the sender's
own, and do not necessarily represent the views and opinions of Summit
Systems Inc.


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About