in reply to Term::ANSIColor is awesome, but.. (need help)
Separate the program logic and the output.
Within your program, always keep $name eq 'Jon', and have a routine, output_name(), which does
print colored($name,'red');
or a function visual_name, which returns the value, ready for printing as name:
sub visual_name { my( $name )= @_; colored( $name, 'red' ); };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Ter::ANSIColor is awesome, but.. (need help)
by mascip (Pilgrim) on Mar 30, 2014 at 13:49 UTC | |
by mascip (Pilgrim) on Mar 30, 2014 at 14:13 UTC | |
by Corion (Patriarch) on Mar 30, 2014 at 14:15 UTC | |
by mascip (Pilgrim) on Mar 30, 2014 at 14:26 UTC | |
by mascip (Pilgrim) on Mar 30, 2014 at 15:23 UTC | |
|