Reputation: 5058
How can I find the index of an element within an array?
For example, given
my @weekdays = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'];
How could I find the index for 'Thursday'
?
Upvotes: 9
Views: 506