in reply to $[ is under respected.
I have a hard time coming up for good reasons ever to change $[ from its default.
The only situation I can imagine, and it's a very farfetched one, is if I am translating from a non-zero-based indexing language (like Fortran) into Perl some extremely complex algorithm that I barely understand and that has lots of array index manipulations. In such a rare situation, for the sake of avoiding translation mistakes I may set $[ to 1. But even this would be temporary; ultimately, with a sufficiently solid test suite to back me up, I'd refactor the whole thing to 0-based indexing.
I'd be curious to know if any other monk has found any other use for a non-zero $[.
the lowliest monk
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: $[ is under respected.
by Anonymous Monk on Aug 03, 2005 at 13:28 UTC | |
|
Re^2: $[ is under respected.
by spiritway (Vicar) on Aug 05, 2005 at 03:19 UTC | |
|