foreach my $record (@records) { # Do stuff with $record }