in reply to Double error when print w/ Tie::STDERR

The documentation for Tie::STDERR is a little sparse, so I used tie_stderr.t. Try this:
#!/usr/bin/perl use strict; use warnings; BEGIN { $|=1; } END { print "not ok\n" unless $::tiestderrloaded; } BEGIN { print "Loading Tie::STDERR\n"; } use Tie::STDERR \&HandleError; $::tiestderrloaded = 1; print "Before\n"; if ($@) { die "...."; } print "After\n"; use Tie::STDERR undef; sub HandleError { my ($error) = @_; &SomeActivity('0',$error); } sub SomeActivity { my ($rc, $error) = @_; print $rc . "\n" . $error; }