Hello everyone, i'm a newbie, and I'm trying to write a simple perl script that takes the stdin and prints it to stdout adding colors that alternates on odd and even lines. The problem is that the newline charachter seems to align to the next line colors and not of the current.
[code] use Term::ANSIColor; foreach(<STDIN>){ $c = (++$i % 2 == 0)? 'white on_black' : 'black on_white'; print colored ($_, $c); } [/code] Is it a flushing problem? I cannot understand why. Do you? many thanks, Francesco Stablum P.S. sorry for my bad english -- The generation of random numbers is too important to be left to chance - Robert R. Coveyou -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/