my @new = @numbers2[@indexes];
For longer sentences, you might notice that the first_index loop is too slow. A hash from words to positions would be much faster to find the position.
($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,
In reply to Re: Using Positions from one array to find the value in the same position of another.
by choroba
in thread Using Positions from one array to find the value in the same position of another.
by RuZombieSlayer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |