sub new ($$;$) { my($class, $attr, $args) = @_; my($self) = $class->SUPER::new($attr, $args); # set up the logfile my $file = IO::File->new ( '/path', "a" ); $file->autoflush ( 1 ) ; $self->{'logfile'} = $file; $self; }