On Fri, May 20, 2011 at 03:40:35PM +0530, a b wrote: > Hi All, > > I need to truncate last few bytes of file. these files are big in size. > > One idea is to write needed bytes to another file and delete the original > file, but i am dealing with big files :( > > dont want to use truncate, it just truncating the size, all data is gone > > any pointers
truncate()'s second parameter is the length to which you want to truncate. Did that not work for you? If not, I would suggest posting some example code that fails, because calling truncate() seems to be the correct approach here. -- Paul Johnson - p...@pjcj.net http://www.pjcj.net -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/