Paul Johnson <[EMAIL PROTECTED]> wrote:
> On Thu, Dec 18, 2003 at 07:26:03PM -0500, Randy W. Sims wrote:
> > On 12/18/2003 7:00 PM, James Edward Gray II wrote:
> > >On Dec 18, 2003, at 5:48 PM, Mike Blezien wrote:
> > >
> > >>Hello,
> > >>
> > >>been trying to come up with a way, while going through a loop to
> > >>alternate a table cell color <td></td>....
> > >
> > >
> > >See if this gets you thinking along the right lines:
> > >
> > >my $odd = 1;
> > >while (<>) { # some kind of loop...
> > > if ($odd) {
> > > # do something
> > > $odd = 0;
> > > }
> > > else {
> > > # do something else
> > > $odd = 1;
> > > }
> > >}
> > >
> >
> > or
> >
> > my $alt;
> > while (<>) { # some kind of loop...
> > if ($alt = !$alt) {
> > # do something
> > }
> > else {
> > # do something else
> > }
> > }
>
> or
>
> while (<>) {
> if ($|--) {
> # do something
HUH?????? Why are you decrementing the $OUTPUT_AUTOFLUSH variable as an
'alternate' for loop???!
Sorry, I don't follow you here.........
-JW
> }
> else {
> # do something else
> }
> }
>
> Oh, no. Hold on. On second thoughts ...
>
> --
> Paul Johnson - [EMAIL PROTECTED]
> http://www.pjcj.net
__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>