package MyPrint; use FileHandle; sub TIEHANDLE { # I'll leave this as an exercise for you. } sub PRINT { my $self = shift; my $handle = $self->{FILEHANDLE}; print $handle @_; print @_; }