Re: 'warn' produces additional output

From: Arndt Jonasson (do-not-use_at_invalid.net)
Date: 02/25/05


Date: 25 Feb 2005 15:39:22 +0100


Martin Kissner <news@chaos-net.de> writes:
> 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?

"perldoc -f warn" says:
             Produces a message on STDERR just like "die", but
             doesn't exit or throw an exception.

And "perldoc -f die" says:
             If the last element of LIST does not end in a
             newline, the current script line number and input
             line number (if any) are also printed, and a newline
             is supplied.

Does this explain what you see?



Relevant Pages

  • warn produces additional output
    ... 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 ... First question: ...
    (comp.lang.perl.misc)
  • confused about firstboot
    ... [i posted my first question about this to the anaconda list, ... it's obviously a chkconfig-based script, i have to assume that, upon ... for firstboot to be run. ... but some of it strikes me as a bit ... ...
    (Fedora)
  • Re: Error handling with Compress::Zlib
    ... Mark Seger wrote: ... > I have a script that periodically copies a number of files from /proc to ... > a zipped file using this library. ... My first question ...
    (comp.lang.perl.modules)
  • Re: Telnet into RH 7.1 box
    ... My first question is this: ... Why set up your own firewall script for ipchains ... My second question is: ...
    (comp.os.linux.security)
  • Re: size of file
    ... And if you have a script that needs to know the ... The direct answer to your first question is: ... Verilog file I/O system functions such as $ftell. ... DOULOS - Developing Design Know-how ...
    (comp.lang.verilog)