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

Re: Comparing to many possibles

Thread Previous | Thread Next
From:
wix
Date:
March 4, 2002 14:19
Subject:
Re: Comparing to many possibles
Message ID:
200203042219.OAA03422@eskimo.com
Greetings All;

Thanks for all the great suggestions! They all worked as
written and now I can go onto the next problem. What ever
that turns out to be!

And to answer a couple of questions;

>}On Mar 4, 12:36, Luke Bakken wrote:
>} Subject: Re: Comparing to many possibles
>Why do you need shorthand for a three-element conditional?

Because the shorthand is shorter than writing it out for all
numbers of elements > 1. This is important because the fewer
"  $x eq " I have to type, the fewer errors I make!
>
>Are you planning on constructing something larger?
>
Well, today it is just three, but next week who knows?

>On Mon, 4 Mar 2002, Dennis G. Wicks wrote:
>
>> 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
>>
>
>}-- End of excerpt from Luke Bakken



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