my $log = Log::Simple->('path/to/file.log'); $log->open; foreach my $stuff (@ARGV) { $log->entry("Stuff happened: $stuff"); } $log->exit("Bad stuff happened", 999);