You're quite likely correct; it's just that from the code fragment given by the OP, I couldn't find where his array was being populated. I also tend to think that an event like $#arr1 giving an incorrect value is unlikely; I would expect that $#arr1 is among the Perl features least likely to have any bugginess. My thinking (I'm easily confused by symbolic references, so I'm likely wrong) is that $#arr1 isn't quite the same as scalar(@$arr1)-1.
In reply to Re^3: Reading a array
by swampyankee
in thread Reading a array
by rsriram
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |