in reply to Where are these newlines coming from?

I tried running your code on my box (Solaris 8, Perl5) and it worked fine. The output that I got was this:
blue:2:purple:1:green:1:red:2
this is after I ran your script 4 times, each time providing a different answer.

This problem of yours might be related to Windows only? Hmm...

"There is no system but GNU, and Linux is one of its kernels." -- Confession of Faith
  • Comment on Re: Where are these newlines coming from?