http://www.perlmonks.org?node_id=174987


in reply to Re: Re: Safe way to open files
in thread Safe way to open files

No. You do not want an unconditional seek in the routine. If it was opened with O_TRUNC or O_RDONLY it isn't needed (neither is truncate), if it was opened with O_APPEND then you definitely do not want to seek nor truncate.