'warn' produces additional output
From: Martin Kissner (news_at_chaos-net.de)
Date: 02/25/05
- Previous message: Mark: "Re: BerkeleyDB locking question"
- Next in thread: Arndt Jonasson: "Re: 'warn' produces additional output"
- Reply: Arndt Jonasson: "Re: 'warn' produces additional output"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 25 Feb 2005 15:08:47 +0100
The following script produces a few lines of output on STDERR.
Some of the lines are supposed to be red (works at least on zsh, bash
and tcsh).
First question:
Why is there a trailing line after "Output line two" with a leading
space character?
" at ./warn.pl line 9."
The only difference between the two warn statements is the position of
the "\n".
Second question:
What are the general prerequisites which cause 'warn' to produce this
additional output?
---- code ----
#!/usr/bin/perl
# use warnings;
use strict;
print "Output line one:\n";
warn "\tMy statusmessage\n";
print "Output line two:\n";
warn "\033\[1;31m \tMy statusmessage\n\033\[1;00m"; # this is line 9
print "Output line three:\n";
warn "\033\[1;31m \tMy statusmessage\033\[1;00m\n";
--- end code ---
--
perl -e '$|=1;&p(7.74.117.115.116.32);&s();&p(97.110.111);&p(116.104.101
.114);&s;&p(32.112.101.114.108);&s();&p(32.104.97.99.107.101.114.10);sub
s{sleep 1};sub p(){print "@_"}'
- Previous message: Mark: "Re: BerkeleyDB locking question"
- Next in thread: Arndt Jonasson: "Re: 'warn' produces additional output"
- Reply: Arndt Jonasson: "Re: 'warn' produces additional output"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|