August 1999 | Return to the Perl Hardware Store | Slide #11 |
The biggest win is using the filehandle part
Perl accepts a glob reference anywhere it normally expects a filehandle
If your object is a blessed glob reference, people can use it like a filehandle
Let's write an object that looks like a regular filehandle
But it supports a remember operation that remembers the current file position
And a gobackto operation that goes back to a saved position
Next | Copyright © 1999 M-J. Dominus |