Jun 2, 2013, 1:38 PM
Post #6 of 7
Re: [perlFun] Can't dereference an array (simple)
[In reply to]
oh wow how could I make such a mistake! But this brings up something I didn't realize, so if I use  instead of () when declaring an array, it gives me an array reference? If that's the case then it makes sense why my example was bad, because from what I understand, @rabbits was just a reference to an array, so when I dereferenced $rabbitRef, it was dereferencing to a reference?
Yes, you basically had in $rabbitRef a reference to a reference to an array. Dereferencing only once, gave you a reference.