in reply to editing a file

You should be looking at the seek and tell functions.

--
<http://www.dave.org.uk>

"Perl makes the fun jobs fun
and the boring jobs bearable" - me