in reply to Re: Problem truncating a huge file
in thread Problem truncating a huge file

Yes , the file is larger than 7782756853 bytes. OS: FreeBSD The actual issue is that I want to remove the last line of a very large file, thats all. For that I used File::ReadBackwards, got the pointer position for the start of last line, and wanted to truncate from that. If so, you might try: use Fnctl; How would this help?

Replies are listed 'Best First'.
Re^3: Problem truncating a huge file
by Mr. Muskrat (Canon) on Aug 27, 2009 at 15:14 UTC

    I have seen reports of truncate failing when use Fnctl ':flock' was used but that changing it to use Fnctl; allowed it succeed. *shrug*

      I AM using use Fnctl ':flock :seek :DEFAULT'; but if I use just use Fnctl; would it not mean I have to replace all instances of LOCK_** with their respective numeric constants?