unless -e $file { open( my $fh, '>', $file) or die "Failed to open '$file': $!"; print $fh "Header"; }