If it wasn't for the fact that you can change the base-index of perl arrays to something other then 0... But I've never seen anyone use that feature yet. The global parameter for the feature is '$['.
So use $# to get the last defined element index so you can safely add (or loop), and use scalar @array to find out how many elements there are in the array...
In reply to Re: Re: Re: where to look up "funny looking" perl notation (and an example)
by Gilimanjaro
in thread where to look up "funny looking" perl notation (and an example)
by glwtta
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |