http://qs321.pair.com?node_id=425469


in reply to tie stdout with IO::Scalar

How about you show us an example were it doesn't capture the output? Here's one that shows it working.

#!/usr/bin/perl use strict; use IO::Scalar; use Data::Dump qw(pp); use Data::Dumper::Simple; my $str; my $io = tie *STDERR, 'IO::Scalar', \$str; pp('monks'); undef $io; untie *STDERR; print Dumper($str); __DATA__ Z:\Perl>ioscalar.pl $str = '"monks" ';

Replies are listed 'Best First'.
Re^2: tie stdout with IO::Scalar
by PodMaster (Abbot) on Jan 27, 2005 at 05:52 UTC
      Thanks for the link.