$fh->getlines
fh
Works like <$fh> when called in an array context to read all the remaining lines in a file, but is more readable. croaks if called in scalar context.
croak
Copyright © 2001 O'Reilly & Associates. All rights reserved.