in reply to Re^2: Deleting all the data after a specific position in a text file.
in thread Deleting all the data after a specific position in a text file.

You does not have to. If you mean size in bytes rather than characters, this can work:
seek $FH,-100, 1 or die $!; truncate "file", tell $FH or die $!; # Cannot use $FH in truncate, it' +s closed
  • Comment on Re^3: Deleting all the data after a specific position in a text file.
  • Download Code