Front page | perl.beginners |
Postings from March 2002
RE: &&
Thread Previous
|
Thread Next
From:
Nikola Janceski
Date:
March 28, 2002 07:00
Subject:
RE: &&
Message ID:
1449413DA482D311B67000508B5A12F50592DF8C@nyexchange01.summithq.com
&& and 'and' have different precendence that's the only difference, but in
your case it doesn't matter.
what exactly are you trying to do? Your code reads
if @dates has data
and the other two BOTH do not have data
then do somthing with @dates
else if the above is false and
@dates has no data and
@themes does have data AND
@cities doesn't have data
then do something with themes.
> -----Original Message-----
> From: MarcusWillemsen@compuserve.de
> [mailto:MarcusWillemsen@compuserve.de]
> Sent: Thursday, March 28, 2002 9:45 AM
> To: beginners@perl.org
> Subject: &&
>
>
> Hi all,
>
>
> I have some arrays and like to trigger some events depending on which
> array or combination of arrays contains data. What I tried was
> something like:
> snippet
>
>
> if(@dates && !@themes && !@cities) {
>
>
> #do something with the data in @dates
>
>
> }
> elsif(!@dates && @themes && !@cities) {
> #do somthing with @themes
> }
> ...
> Alas! I doesn't work. Using "and" instead of "&&" doesn't help either.
> Or do I have to use "&" instead. Although it doesn't work either.
> instead
>
> Can someone help??
> Thanks
>
>
>
> Marcus Willemsen
> Online Redaktion
> Juve Verlag
> Agrippastr. 10
> 50676 Köln
>
>
> tel: ++49(0)221 91 38 80 16
> fax: ++49(0)221 91 38 80 18
> www.juve.de
> juve-newsline@juve.de
> marcus.willemsen@juve.de
>
>
> --
> 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
-
&&
by MarcusWillemsen
-
Re: &&
by MarcusWillemsen
-
RE: &&
by Nikola Janceski
-
RE: &&
by Nikola Janceski
-
RE: &&
by Nikola Janceski
-
Re: &&
by Chas Owens