Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

(tye)Re: alternating row colors

by tye (Sage)
on May 18, 2001 at 01:41 UTC ( [id://81378]=note: print w/replies, xml ) Need Help??


in reply to alternating row colors

sub genRotar { my( $pos, @vals )= ( 0, @_ ); return sub { $pos= 0 if @vals <= $pos; $vals[$pos++] } } sub Rotar::TIESCALAR { shift; return bless genRotar( @_ ), 'Rotar'; } sub Rotar::FETCH { $_[0]->(); } my $rowcolor; tie $rowcolor, 'Rotar', '#FF0000', '#00FF00', '#0000FF';
Then just append the code you already have above.

        - tye (but my friends call me "Tye")

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://81378]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2024-04-25 05:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found