in reply to How to find the index of an element in an array?
prints:perl -e ' @foo=('a','b','c', 'd', 'e', 'f', 'g', 'h', 'i'); $str = join("",@foo); $idx = index($str,'g'); print "$str-$idx\n";'
abcdefghi-6
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to find the index of an element in an array?
by holli (Abbot) on Sep 06, 2005 at 06:56 UTC |