"be consistent" | |
PerlMonks |
Re^2: Getting first and last element value of a hash loopby parv (Parson) |
on Jun 05, 2015 at 22:06 UTC ( [id://1129267]=note: print w/replies, xml ) | Need Help?? |
Or, simply use -1 to get the last element: $array[-1]. See perldata: Subscripts.
In Section
Seekers of Perl Wisdom
|
|