When looping line by line (ie array, handle), I see two popular methods - foreach(@array) and while<handle>
From How can I process large files with while(<>)?, one advantage of while<handle> is that you don't have to open the entire file to process it.
So when would using foreach be better?