open FH, "+< $filename" or die $!; seek FH, 0, 0 or die $!; print FH "sm.th."; # printing to the first line [download]
In reply to Re: writing to a file by sh1tn in thread writing to a file by Anonymous Monk