5% assure discount from here only

Monday, January 24, 2011

(4) How do I find the index of the last element in an array?

Solution :

my @a=(1,2,3,4,5,6);
my $lastindex=$#a;
print $lastindex;

No comments:

Post a Comment