On Wed, Aug 16, 2000 at 08:27:04PM +0000, Nick Ing-Simmons wrote:
> Perl6 Rfc Librarian <[EMAIL PROTECTED]> writes:
> >
> >In addition, this RFC recommends deprecating select(), since it is no
> >longer needed with the new fileobject approach described in RFC 14.
> >
> >
> >   $oldoutput = select($newoutput);
> >
> >Can now be written simply as reassignments:
> >
> >   $oldoutput = $STDOUT;
> >   $STDOUT = $filehandle;
> 
> But that is _NOT_ what select() does:
> 
>    $olddef = select($newdef);
>    print $STDOUT "Still goes to $STDOUT";
>    print "This goes to $newdef";
> 
> select sets the default for a print with no handle specified it does NOT 
> change STDOUT.
> 
> It will be impossible to translate many perl5 programs to perl6 if 
> that difference is not retained somehow.

Create a new handle, like $DEFOUT. Then there would be no need
for selectsaver either as you would do the equiv. of

  local($DEFOUT) = $newhandle;

Graham.

Reply via email to