Help for this page
use File::Temp qw(tempfile); my $file = 'test.txt'; ... close $fh; close $tmpfh; rename $tmpfile, $file;
use Fcntl qw(:seek); use File::Temp qw(tempfile); ... print $fh2 $_ while <$tmpfh>; close $fh2; close $tmpfh;