$sth->bind_columns( undef, \$orig_service_id, \$orig_stop, $depart_orig); while ($sth->fetch()) { $ids{$orig_service_id} = { stop_reference => $orig_stop, depart_time => $depart_orig, } }