note
Zaxo
<p>You could [local]ize STDOUT, opening it to a variable.
<code>
my $out = do {
my $msg;
open local( *STDOUT), '>', \$msg or die $!;
mytest();
$msg
};
</code>
That takes Perl 5.8+ for opening a handle to a variable.</p>
<p><ins>++[fenLisesi] caught a thinko in text, s/STDERR/STDOUT/. Repaired.</p>
<div class="pmsig"><div class="pmsig-82147">
<p>After Compline,<br/>Zaxo</p>
</div></div>
625928
625928