sub new{ my ($class, $logname) = @_; $logname or die "NO log file name specified"; my $self = bless {}, $class; # Creating an empty instance $self->{EXP} = Expect::->new(); # Now has an EXP attribute open $self->{LOGFH}, ">>", $logname or die "Could not append to $logname : $!"; return $self; }