package Log; use strict; use warnings; sub new { my ($class, $args) = @_; open (my $fh, ">>", $args->{'logfile'}) || die "Oops...\n"; my $self = { _LOGFILE => $args->{'logfile'}, _CALLER => $args->{'caller'}, _FH => $fh, }; return bless($self, ref($class) || $class); } sub writeError { my ($self, $msg) = @_; print $msg, "\n"; } sub get_logger { ... # What should this code be to allow the Log->writeError() # call (below in Foo) to succeed??? ... } 1;