Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Perl ignores lines with bold characters from a pipe on Windows

by Joost (Canon)
on Mar 03, 2007 at 02:27 UTC ( [id://603012]=note: print w/replies, xml ) Need Help??


in reply to Perl ignores lines with bold characters from a pipe on Windows

If you were on UNIX I'd guess the bold lines were printed to STDERR instead of STDOUT and so wouldn't be redirected by the mycmd > test_perl3 line. Possibly the same thing would happen on windows.

  • Comment on Re: Perl ignores lines with bold characters from a pipe on Windows
  • Download Code

Replies are listed 'Best First'.
Re^2: Perl ignores lines with bold characters from a pipe on Windows
by kingkongrevenge (Scribe) on Mar 03, 2007 at 02:33 UTC

    Definitely nothing going to STDERR.

    In case it matters, the bold lines look this:
    C:\a\file [AFLAG]

    Perhaps the bolded '[' means something to perl IO? I'm grasping at straws.

      In case it matters, the bold lines look this:
      C:\a\file [AFLAG]

      Well, text is text, and it knows no intrinsic notion of charachter attributes, like bold. However one early, conceptually simple and long-lasting strategy to achieve them was and is by means of ANSI escape codes: support for them is built in under Linux. Back in the days of good 'ol DOS, you would use the ANSI.SYS device driver to enable them. (And at some point ANSI art flourished.) This remained possible up to the 9.x Windows releases, but NT based ones do not support it anymore, which is the reason why dedicated ANSI art viewers and, speaking of Perl, a module like Win32::Console::ANSI exist. Thus a program that wants to output charachters with attributes under recent Windowsen needs to dialogue directly with the console APIs, e.g. in Perl by means of Win32::Console upon which Win32::Console::ANSI relies. Chances are that it is not perl that "ignores" lines with bold charachters, but that those lines are not printed to STDOUT at all.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://603012]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2024-04-25 07:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found