http://www.perlmonks.org?node_id=603447

freja has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

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

./my.pl >log 2>&1
the message is repeated... Is any way to check that both streams are connected to the same file?