On 02/28/2017 04:11 AM, yary wrote:
On Tue, Feb 28, 2017 at 12:53 AM, ToddAndMargo <toddandma...@zoho.com <mailto: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!
I think I am blind, but I am not finding the extra () :'(
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
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Computers are like air conditioners. They malfunction when you open windows ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~