open (DATABASE, "file"); while ($rec = ) { # Do stuff } close DATABASE;