while (defined (my $record = $file_object->next()) { # next creates a record object from data in the file $records->process(); }