in reply to Re: truncate a file from top
in thread truncate a file from top

seek FILE,0, 2; #go to EOF seek FILE,-2048,2; #get last 2k bytes
Not much point in seeking twice is there? The latter seek, seeks to 2048 bytes from the end - no reason to first seek to the end. And for readability (and portability) reasons, I would use seek FILE, -2048, SEEK_END;, importing the constant from Fcntl.