in reply to Finding index of an entry in an Array
{map($_ eq 'bar' && last || $index++, @repo)}; #or {grep(/^\Q$input\E$/ && last || $index++, @repo)};
|
---|
In Section
Seekers of Perl Wisdom
in reply to Finding index of an entry in an Array
{map($_ eq 'bar' && last || $index++, @repo)}; #or {grep(/^\Q$input\E$/ && last || $index++, @repo)};
|
---|