in reply to head truncate

Aristotle, I tried your method and it dosn't work right. I start with basics, like just remove 1 byte and see what happens. So if I use your script like: scriptname 1 file somefile it increases the file size, and dosn't remove the first byte of the first line. I originally tried a similar method before using the Tie::File approach. I ran into a similar problem, when trying to truncate the filehandle to 0, then writing the filehandle again with the file remains, it somehow just adds it to the end. It stymied me.