The function you seek is... seek
use strict; use warnings; open my $fh, ">", "testing1.txt"; print $fh "stat"; seek $fh, 0, 0; print $fh "stat-updated"; close $fh; system cat => "testing1.txt";
In reply to Re: Empty File Contnts before writing
by tobyink
in thread Empty File Contnts before writing
by gautamparimoo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |