more useful options | |
PerlMonks |
Re: Array indicesby sauoq (Abbot) |
on Sep 14, 2002 at 06:08 UTC ( [id://197811]=note: print w/replies, xml ) | Need Help?? |
For the most part you can get by without using indices at all. Here's a version of your code that avoids them.
I imagine it may very well be possible to get by without them entirely but it would hardly be worthwhile to try. Retrieving an element in the middle of an array without using indices will always be an O(N) operation but retrieving it by index is O(1). A good programmer may not need them but a good program often will. Update: At Limbic~Region's request:
-sauoq "My two cents aren't worth a dime.";
In Section
Seekers of Perl Wisdom
|
|