more useful options | |
PerlMonks |
Re: Re: Scope when initializing with references in a loopby IraTarball (Monk) |
on Dec 06, 2001 at 03:57 UTC ( [id://129810]=note: print w/replies, xml ) | Need Help?? |
*why* one wd do this) It might be hard to see with this example, but the actual code has 'nodes' defined, each with references to it's "neighbors". The reference seemed clean because I could get at the values I want without having to figure out what the indices are for all of my neighbors. For this array it may seem trivial, but imagine an array of n dimensions.
the snag I see is that the first couple of times round the loop $array[1] is undefined. Ira,
In Section
Seekers of Perl Wisdom
|
|