#The logger will write to the file when the logger is #destroyed, or by explicitly calling the flush() function. my $l = Loger->new(fileName=>'/tmp/log.log'); $l->add("Log line 1","cat to log"); die "Died for some reason..."; #More program below