Re: bold print to a FH
- From: japhy@xxxxxxxxxxxx (Jeff 'japhy' Pinyan)
- Date: Fri, 27 May 2005 00:00:20 -0400 (EDT)
On May 26, DBSMITH@xxxxxxxxxxxxxx said:
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
^^^ This is the important part.
disk_cache-tape_slot-usage.pl line 45
main::mediausage() called at disk_cache-tape_slot-usage.pl line
This means that Perl is interpreting your code as
print MU color("bold", "Media Usage Key ...");and the problem is that the color() function isn't expecting that "Media" string. The solution is:
print MU color("bold"), "Media Usage Key ...", color("reset");-- Jeff "japhy" Pinyan % How can we ever be the sold short or RPI Acacia Brother #734 % the cheated, we who for every service http://japhy.perlmonk.org/ % have long ago been overpaid? http://www.perlmonks.org/ % -- Meister Eckhart .
- References:
- Re: bold print to a FH
- From: DBSMITH
- Re: bold print to a FH
- Prev by Date: Re: is there a simple way get the current line number of processed file?
- Next by Date: Re: is there a simple way get the current line number of processed file?
- Previous by thread: Re: bold print to a FH
- Next by thread: RE: bold print to a FH
- Index(es):
Relevant Pages
|