Somu wrote:
Well, now i know something more. Can't we treat references as
pointers?

In some cases yes. Pointers point to a memory location, references point to a variable. You can do arithmetic with pointers but not with references.

We use link list in C for the reason that an array needs
continuous memory locations like 1 2 3 4 5 6 .. And when the size is
big, it may fail. So, we use link list. And pushing things into a C
array is not allowed. So we do this by linked list.

In C traversing an array and a linked list are both O(n). You use a linked list if you want to insert and delete elements at any location. Linked lists also use more memory because you have to store a pointer with every element of the list (or two if you are using a doubly linked list.)

Does perl compiler
use this link list concept and keeps it hidden from us?

I haven't read the source code but it probably does somewhere.



John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order.                            -- Larry Wall

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to