in reply to Perl Test - Capture print statements
You could localize STDOUT, opening it to a variable.
That takes Perl 5.8+ for opening a handle to a variable.my $out = do { my $msg; open local( *STDOUT), '>', \$msg or die $!; mytest(); $msg };
++fenLisesi caught a thinko in text, s/STDERR/STDOUT/. Repaired.
After Compline,
Zaxo
In Section
Seekers of Perl Wisdom