Did you perhaps mean:$index++ until @repo[$index] eq $input or $i > $#repo;
$index++ until $repo[$index] eq $input or $index > $#repo;
since you don't declare $i anywhere, and I'd have a hard time not getting that to loop forever when I started comparing zero to $#repo :)
Edit: thanks to IRCperson for spotting $repo[$index]
In reply to Re^2: Finding index of an entry in an Array
by dwu
in thread Finding index of an entry in an Array
by monkfan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |