open my $report_log_fh, '>>', $logfilename ... #### ... or die "Can't open '$logfilename' for appending: $!"; #### use strict; use warnings;