in reply to Re: for loop trouble
in thread for loop trouble

It's not at all onerous to implement part doing just one pass, without a module:
push @{/$hit/ ? \@hits : \@potential_hgt}, $_ for @pids;

Caution: Contents may have been coded under pressure.