In your second snippet:
my $idx = first { $_ eq "string" } 0..$#array;You surely meant to write:
my $idx = first { $array[$_] eq "string" } 0..$#array;In reply to Re^2: Returning position?
by Not_a_Number
in thread Returning position?
by theoya
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |