M
mike
is there a way to do 'open(FH, ">", x)' without erasing what's in the
file? I want to open a file for writing then when I actually do the
write, keep replacing just the first line (all that's ever in the file is
a single line at the top) - but I don't want the (original) first line
erased until I do my first new write.
I tried ">>" and iterations of "seek(FH, -20, 0);" fiddling with
position/whence but it seems (to me) that with ">>" perl treats the
'beginning' of the file as whatever position followed what existed in the
file when it was opened; iow I can't go to absolute 0 in the file (or
rather am having trouble figuring out how to go to 0).
thanks.
--
file? I want to open a file for writing then when I actually do the
write, keep replacing just the first line (all that's ever in the file is
a single line at the top) - but I don't want the (original) first line
erased until I do my first new write.
I tried ">>" and iterations of "seek(FH, -20, 0);" fiddling with
position/whence but it seems (to me) that with ">>" perl treats the
'beginning' of the file as whatever position followed what existed in the
file when it was opened; iow I can't go to absolute 0 in the file (or
rather am having trouble figuring out how to go to 0).
thanks.
--