in reply to Re: Re: Re: substitution in $0
in thread substitution in $0

open (PROG, "+>>$0"); seek (PROG, 0, 0); #I don't know why but it's NECESSARY!

Because  >> moves the file position to end-of-file.