in reply to Re^2: Filtering very large files using Tie::File
in thread Filtering very large files using Tie::File

I just thought that wouldn't work for this purpose without sorting the file alphabetically first.

That makes no sense. If you can't do it by reading the file a line at a time using <>, what makes you think you can do it by reading the file a line at a time using Tie::File. Conversely, if you can do it by reading a line at a time using Tie::File, you can do it by reading a line at a time using <>.

Replies are listed 'Best First'.
Re^4: Filtering very large files using Tie::File
by elef (Friar) on Nov 27, 2010 at 22:18 UTC
    Because Tie::File doesn't go line by line, for example? Not that it has any importance at this point.

      Quite the contrary. I'm trying to explain that your logic for picking Tie::File was wrong. If you don't realise this, you're likely to make that mistake again.

      sort requires the whole array regardless of how you read the file, so changing the way you read the file is not the solution.