Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re: How many colors does a rainbow have?

by adamcrussell (Hermit)
on Jan 25, 2009 at 02:05 UTC ( #738742=note: print w/ replies, xml ) Need Help??

in reply to How many colors does a rainbow have?

All I remembered was that the colors could be remembered via the "name" Roy G Biv...I let my laptop do the counting. :)

$ echo roygbiv | tr -d "\n" | wc -m
Or for much nicer perl powered output:
$ echo roygbiv | perl -e '$a=<STDIN>;chomp $a;printf "There are %d col +ors in the rainbow.\n",length $a'

Comment on Re: How many colors does a rainbow have?
Select or Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (14)
As of 2015-10-06 20:59 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (160 votes), past polls