Below is a snippet of Perl code. I would like to loop through several queries with different regular expression ($myo) and for different operators ($op) and save the results to an array of arrays rather than one large @result array.
I.e., the array of results for MYO[0-9]*$ would be an array for each operator $results[0][0], $results[0][1] ... and for MYO[0-9]*R$, $results[1][0], $results[1][1].
Any ideas?
my @tech_ops = ("AR","DB","GM","LW","MM","SA");
my @results;
for my $myo (qw(MYO[0-9]*$ MYO[0-9]*R$ MYO[0-9]*T$ MYO[0-9]*U$)) {
foreach $op (@tech_ops)
{
$sth->execute($myo, $date_stop, $date_start,$op)
or die "Couldn't execute query for $myo: " . $sth->errstr;
push @results, $sth->fetchrow_array;
}
}