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" ';
In reply to Re: tie stdout with IO::Scalar
by Mr. Muskrat
in thread tie stdout with IO::Scalar
by jacques
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |