@records = ( {field1 => 'row1-1', field2 =>'row1-2'}, {field1 => 'row2-1', field2 =>'row2-2)); foreach my $row (\@records) { #..Do some stuff.. }