...Beauty, cleaning, DIY tips and more - free to join!
   Login   Contact us   Site map   Puzzle Club   Ask a question    Newsletter

How To Access The Last Item In A Perl Array

Computing : Learning Perl

The easiest way to do this is to count back from the end of the array.

For instance, if an array has three values,
$item[0], $item[1] and $item[2] then you can access the last with:
$item[-1]... an easy way to reach it!


By: Stephen

Share on Facebook: On Twitter: TwitterTweet this!

  Reply to How To Access The Last Item In A Perl Array

  Receive Our Newsletter




Questions about Learn Perl:

Ask question

More Articles:
Creating a beauty website
How to get paid for your opinions
Why buying from abroad is riskier