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


in reply to Re: Delete duplicate data in file
in thread Delete duplicate data in file

It is not whether you "depend on the files being sorted", but whether it is a fact that the file is sorted.

If it is (for example it could be some sort of log), to hold the entire file in momery is then a waste.