http://qs1969.pair.com?node_id=202254


in reply to substitution in $0

I believe that I can provide an answer for why seek isn't happening how you would like it to. You are opening the file in append mode (with the ">>"). In this mode, anything you write will be appended to the original file. There is a lot of information gained by typing perldoc -f open at your nearest command prompt. And from what I see, I think that you need "+<" in front of the $0.

Enjoy.