cbtshare:
If your $api_results is holding a reference to an array of arrays of data like this:
$api_results = [
[ "id1", "app_slug1", "app_name_1", "provider_id_1", ..etc.. ],
[ "id2", "app_slug2", "app_name_2", "provider_id_2", ..etc.. ],
. . . . . . . . . . . . . . .
[ "idN", "app_slugN", "app_name_N", "provider_id_N", ..etc.. ]
];
Then I think what you're looking for is:
# Prepare a handle to an insert statement:
$app_insert = $dbh->prepare("INSERT .....blah, blah");
# Fetch each row of data from results
while (my $row = shift @$api_results) {
# Tell the insert statement to insert the data
$app_insert->execute(@$row);
}
print "Done inserting\n";
...roboticus
When your only tool is a hammer, all problems look like your thumb.