Reference: new
Author: Ellen Siever, Stephen Spainhour & Nathan Patwardhan
Date: 1999-07-02T01:52:06Z

#

| Chapter 8 Standard Modules |

## new

    $saver = new SelectSaver[(fh)]

Constructor. Creates a new SelectSaver object, $saver, which saves the current filehandle. The optional parameter fh is the filehandle that is to temporarily replace the current filehandle. If fh is present, the current filehandle is saved in $saver and the new one becomes the current filehandle. With no parameter, the current filehandle is saved in the object $saver, and it also remains current.

You can use the newly selected filehandle within the current block. When you exit the block, the previous filehandle is again made the current one, and the SelectSaver object in which it was stored is destroyed.

8.128 SelectSaver |  | 8.128 SelectSaver