while (my $libline = <$LIBFILE>) { ... do stuff with $libline ... }