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


in reply to Re: Trying to do multiple while loops on the same input file
in thread Trying to do multiple while loops on the same input file

Good suggestion. In this particular case, I just moved the open and close commands inside the loop, but in other situations, reading the file into an array would make more sense.