... my $raResults = []; while( $raRow = $projects->fetchrow_arrayref() ) { push @$raResults, [ @{ $raRow }[ 0, 1, 2 ] ]; } return $raResults; ... #### foreach my $raRowPick ( @$raResults ) { print do{ local $" = qq{\t}; qq{@$raRowPick\n}; }; } #### foreach my $raRowPick ( @$raResults ) { print do{ local $" = qq{\t}; qq{@$raRowPick\n}; }; if( $raRowPick->[ 0 ] eq $theIdWeWant ) { doSomethingWith( $raRowPick[ 0 ] ); } }