in reply to Capturing STDERR using IO::Handle
This can't be done with simple ties.
It can be done with Test::Trap, though. :) (Shameless as ever ....)
use Test::Trap qw/ :flow:stderr(systemsafe) /; # or similar trap { system 'command', 'with', 'args' }; my @logmessages = split /\n/, $trap->stderr; # chomped! or season to t +aste
Not exclusively for use in test scripts, indeed. :)
print "Just another Perl ${\(trickster and hacker)},"
The Sidhekin proves Sidhe did it!
In Section
Seekers of Perl Wisdom