Or if you really want to use one of Perl's special variables, try this:
since "0" is not necessarily the first element of the array. Of course, nobody should ever, ever change the $[ variable except as part of an obfuscated perl program. :)for ($[..$#array) { ## Foo }
In reply to RE: Re: Of for each loops and counting
by turnstep
in thread Of foreach loops and counting
by Cirollo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |