RE: probably a simple question

2002-06-05 Thread Bryan R Harris
uot;blue\n" : print "red\n" } > -Original Message- > From: Bryan R Harris [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, June 05, 2002 1:52 PM > To: [EMAIL PROTECTED] > Subject: Re: probably a simple question > > > > > > $_ % 2 ? print "bl

Re: probably a simple question

2002-06-05 Thread Janek Schleicher
Bryan R Harris wrote at Wed, 05 Jun 2002 19:51:49 +0200: >> $_ % 2 ? print "blue\n" : print "red\n" foreach (@your_list); > > > This actually works?! Very strange notation, how does the compiler see this line? >I assume the > mod operator evaluates to 1-true or 0-false, what does the "?" do?

RE: probably a simple question

2002-06-05 Thread David . Wagner
, June 05, 2002 10:52 To: [EMAIL PROTECTED] Subject: Re: probably a simple question > $_ % 2 ? print "blue\n" : print "red\n" foreach (@your_list); This actually works?! Very strange notation, how does the compiler see this line? I assume the mod operator evaluates to 1-tru

RE: probably a simple question

2002-06-05 Thread Nikola Janceski
an R Harris [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, June 05, 2002 1:52 PM > To: [EMAIL PROTECTED] > Subject: Re: probably a simple question > > > > > > $_ % 2 ? print "blue\n" : print "red\n" foreach (@your_list); > > > This actually w

Re: probably a simple question

2002-06-05 Thread Bryan R Harris
> $_ % 2 ? print "blue\n" : print "red\n" foreach (@your_list); This actually works?! Very strange notation, how does the compiler see this line? I assume the mod operator evaluates to 1-true or 0-false, what does the "?" do? What does the ":" do? How do you have a foreach at the end of a

RE: probably a simple question

2002-06-05 Thread Bob Showalter
> -Original Message- > From: Zachary Buckholz [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, June 04, 2002 10:11 PM > To: [EMAIL PROTECTED] > Subject: probably a simple question > > > Is there any function to tell if a number is even or odd? > I am looking for an

Re: probably a simple question

2002-06-05 Thread Rajeev Rumale
> Sent: Wednesday, June 05, 2002 5:01 PM Subject: Re: probably a simple question > Zachary Buckholz wrote: > > > Is there any function to tell if a number is even or odd? > > I am looking for an easy way to loop through a list and > > output table cell bgcolor based on eve

Re: probably a simple question

2002-06-05 Thread Sudarsan Raghavan
Zachary Buckholz wrote: > Is there any function to tell if a number is even or odd? > I am looking for an easy way to loop through a list and > output table cell bgcolor based on even / odd. > > if its an even numbered row make it red if its odd make > it blue. $_ % 2 ? print "blue\n" : print "r

Re: probably a simple question

2002-06-05 Thread Tor Hildrum
> Is there any function to tell if a number is even or odd? > I am looking for an easy way to loop through a list and > output table cell bgcolor based on even / odd. > > if its an even numbered row make it red if its odd make > it blue. > > I have done it in the past by turning a switch on or o

probably a simple question

2002-06-05 Thread Zachary Buckholz
Is there any function to tell if a number is even or odd? I am looking for an easy way to loop through a list and output table cell bgcolor based on even / odd. if its an even numbered row make it red if its odd make it blue. I have done it in the past by turning a switch on or off but I think t