RE: bold print to a FH
- From: t.baetzler@xxxxxxxxxx (Thomas Bätzler)
- Date: Fri, 27 May 2005 08:39:56 +0200
<DBSMITH@xxxxxxxxxxxxxx> asked:
> the code
>
> print MU color 'bold', "BLAH BLAH BLAH \n";
>
> is not working with error:
>
>
> Uncaught exception from user code:
> Invalid attribute name media at
> disk_cache-tape_slot-usage.pl line
> 45
> Carp::croak('Invalid attribute name media') called at
> /usr/perl5/5.6.1/lib/Term/ANSIColor.pm line 119
> Term::ANSIColor::color('bold', 'Media Usage Key for all ASM
> clients:', ' ', '17:35 05/26/05^J') called at
OTTOH the problem is your "lazy" syntax - Term::ANSIColor::color
seems to pick up arguments that should go to print(). You can fix
this by bracketing the argument to color, i.e.:
print MU color('bold'), "BLAH BLAH BLAH \n";
HTH,
Thomas
.
- Prev by Date: Re: is there a simple way get the current line number of processed file?
- Next by Date: [OT] Is there a policy regarding subscrjbers with challenge/respo nse mail filters?
- Previous by thread: Re: bold print to a FH
- Next by thread: is there a simple way get the current line number of processed file?
- Index(es):
Relevant Pages
|