On Tue, Feb 28, 2017 at 12:53 AM, ToddAndMargo <toddandma...@zoho.com>
wrote:

> sub PrintRed   ( $Str ) { print color('bold'), color('red'),   "$Str",
> color('reset'); }
> sub PrintGreen ( $Str ) { print color('bold'), color('green'), "$Str",
> color('reset'); }
> sub PrintBlue  ( $Str ) { print color('bold'), color('blue'),  "$Str",
> color('reset'); }
>

You don't need the double quotes around $Str- not even in Perl5!

sub PrintRed   ( $Str ) { print color('bold'), color('red'),  $Str,
color('reset'); }

The module examples imply that you can combine color strings, does this
work?

sub PrintRed   ( $Str ) { print color('bold red'),  $Str, color('reset'); }

And there's a helper routine "colored" that combines the color, string, and
reset (I think, I don't have the module installed to test, again this is
from reading the examples)

sub PrintRed   ( $Str ) { print colored($Str, 'bold red'); }


say colored("IM IN UR MODULE MESSING WITH UR COLOURS",
"bold green on_blue");
-y

Reply via email to