I think you are a bit confused.
Taking a look at perldoc perlvar, one might note that $# is deprecated. This is not the same $#array of which you speak. Your code above breaks whenever anyone bothers changing $[ (perhaps an insane programmer wishing to update your code?). Your code above should instead be written as:
@parent[3..@parent-1+$[]
Of course, @parent - 1 + $[ is a long way of saying $#parent. So why not just use it?
antirice
The first rule of Perl club is - use Perl
The ith rule of Perl club is - follow rule i - 1 for i > 1
In reply to Re: Re: Re: Optimization of array looping...
by antirice
in thread Optimization of array looping...
by salonmonk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |