There's no need to create two intermediate arrays when we can
modify the existing arrayref.
my $eidx_key_sth = $dbh->prepare_cached(<<'', undef, 1);
SELECT eidx_key FROM inboxes WHERE ibx_id = ?
- [ map {
- my $r = $_;
+ for my $r (@$rows) {
$eidx_key_sth->execute($r->[0]);
my $eidx_key = $eidx_key_sth->fetchrow_array;
$eidx_key //= "missing://ibx_id=$r->[0]";
- "$eidx_key:$r->[1]:".unpack('H*', $r->[2]);
- } @$rows ];
+ $r = "$eidx_key:$r->[1]:".unpack('H*', $r->[2]);
+ }
+ $rows;
}
sub next_by_mid {