⭐ in reply to How do I find the index of the last element in an array?
You can find it in the special variable $#arrayname
For example:
For example:
@foo=('b','a','r'); $lastindex=$#foo; #in this case 2 the index of 'r'
|
---|
In Section
Seekers of Perl Wisdom