open (my $fh, '>>', 'perlogfile.rtf') or die "Unable to open logfile: $!"; print $fh @stuff; close ($fh);