Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Random Color Generator

by salvadors (Pilgrim)
on Dec 31, 2000 at 16:31 UTC ( #49093=note: print w/ replies, xml ) Need Help??


in reply to Random Color Generator

That's quite a longwinded way of generating the colors array. Especially as you do exactly the same in each part of the 'if'!

I'd use something like:

my @colors = map { join "", map { sprintf "%02x", rand(255) } (0..2) } (0..63);

Tony


Comment on Re: Random Color Generator
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (16)
As of 2015-05-28 16:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    In my home, the TV remote control is ...









    Results (561 votes), past polls