freja has asked for the wisdom of the Perl Monks concerning the following question:
it might be a silly question.. I have a Perl script:
print STDOUT 'This is an important message!'; print STDERR 'This is an important message!';
So, I want to be sure that the text appears in both stdout and stderr files. But if a user run the script as
the message is repeated... Is any way to check that both streams are connected to the same file?./my.pl >log 2>&1
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: if (STDERR == STDOUT)
by merlyn (Sage) on Mar 06, 2007 at 16:35 UTC | |
|
Re: if (STDERR == STDOUT)
by imp (Priest) on Mar 06, 2007 at 16:39 UTC | |
|
Re: if (STDERR == STDOUT)
by ikegami (Patriarch) on Mar 06, 2007 at 16:28 UTC | |
by madbombX (Hermit) on Mar 07, 2007 at 04:59 UTC | |
|
Re: if (STDERR == STDOUT)
by Rhandom (Curate) on Mar 06, 2007 at 16:36 UTC | |
|
Re: if (STDERR == STDOUT)
by Moron (Curate) on Mar 06, 2007 at 18:02 UTC |