open my $fh, "+>", undef or die $!; # open a temp file #### my $file = undef; open my $fh, "+>", $file or die $!;