in reply to Find last position of an element in array
skipping past the sigil or brace mismatch, here is my five minute contribution...
perl -le ' my @arr = (1,1,1,2,2,2,2,2,3,3,3,4,4,4,4,4,4,5,5,6); print (@arr - index((reverse(@arr)), 4)); ' __output__ 17
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Find last position of an element in array
by kcott (Archbishop) on Mar 29, 2022 at 21:49 UTC | |
Re^2: Find last position of an element in array
by hippo (Archbishop) on Mar 30, 2022 at 09:49 UTC |