What's the compact way to find the index of 'bar' in @repo, such that finally it returns '2' (index in @repo).my $input = $ARGV[0] || 'bar'; my @repo = qw (foo bar qux);
In reply to Finding index of an entry in an Array by monkfan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |