Next Tricks of the Wizards 37

Globjects

        sub remember {
          my ($self, $key) = @_; # $self is a GLOB reference
          *$self->{$key} = tell $self;
        }

        sub gobackto {
          my ($self, $key) = @_;
          seek $self, *$self->{$key}, 0;
        }


Next Copyright © 2003 M. J. Dominus