opensubscriber
   Find in this group all groups
 
Unknown more information…

a : activeperl@listserv.ActiveState.com 26 November 2005 • 3:19AM -0500

Re: :FTP::Common
by $Bill Luebkert

REPLY TO AUTHOR
 
REPLY TO GROUP




Brian Raven wrote:

> If you mean your "warn" message, all you need to do is redirect the
> STDERR file handle to a scalar. See 'perldoc -f open' for how to do
> that. See the 'open FILEHANDLE,MODE,REFERENCE' variant, which is new in
> Perl 5.8.

If you have 5.8 and use this method, make sure you close STDERR
before opening to the scalar ref.

EG:

my $out;
close STDERR;
open STDERR, '>', \$out;
print STDERR "Some stuff\n";
print STDOUT "\$out='$out'\n";
_______________________________________________
ActivePerl mailing list
ActivePerl@list...
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

opensubscriber is not affiliated with the authors of this message nor responsible for its content.