If your on 5.8.1 (from memory), you can skip using IO::Scalar completely and using teh new form of open to a scalar (which means $/ is honoured correctly).
#! perl -slw use strict; my $x; { local *STDERR; open STDERR, '>', \$x or die "STDERR $!"; print STDERR 'stuff'; warn 'Sommats up!'; } print STDERR 'More stuff'; print "Caught: $x"; __END__ P:\test>381308 More stuff Caught: stuff Sommats up! at P:\test\381308.pl line 9.
In reply to Re: Tieing a local filehandle
by BrowserUk
in thread Tieing a local filehandle
by etcshadow
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |