...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:
How to get traffic to your website
How to fill in computer forms quickly
Is Search Engine Optimization the Best Bang for your Buck?