Re: bold print to a FH



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
.



Relevant Pages

  • cd writer does not work
    ... It will just come up with an error telling me that the media is invalid, ... Jamie Morgan ... p.s. any suggestions plz mail me ...
    (microsoft.public.windowsxp.hardware)
  • Re: James May on JR show
    ... I appreciate JR is hardly a role model, but it is no wonder the world of science and engineering is ripped to shreds by the media if it has become "entertainment" to ridicule someone who actually makes the topic highly accessible. ... I couldn't agree with you more, and in fact Ross's attitude is indicative of the jizzwank producers and managers that the media is now full of. ... This 'sneering' attitude towards science and technology by the media is extraordinary, not least because the media relies upon cutting edge technology to reach its audience! ... Please replace invalid and invalid with gmx and net to reply. ...
    (uk.media.tv.misc)
  • Re: Windows Media Center on Vista Ultimate
    ... Invalid Application ... Unable to launch "" ... this happens for Internet TV and Online Media Learn ... Windows help has more info for you. ...
    (microsoft.public.windows.vista.general)
  • MSNBC.COM beta
    ... Now, MSNBC.COM beta in Media Center reports, Invalid Application Unable to Launch. ...
    (microsoft.public.windows.vista.general)
  • Re: Media Center problem
    ... A number of activities comes up with an error message " ... Invalid Application ... Unable to launch "" ... this happens for Internet TV and Online Media Learn ...
    (microsoft.public.windows.vista.general)