use strict ; use warnings; use diagnostics ; # explain the warnings open(FH,">C:/tmp.txt") || die "blah blah $!"; print FH "some text\n"; close(FH); open(FH, "; print $test;