in reply to Behind the Scenes - Perl Variables
I couldn't find a definite answer either, but let's think about all the different things one can do with variables in Perl: you can do typecasting with little care what data types you are working with; you can assign references to arrays and hashes to variables, and so on...
Coming from C background, I can only think of one way to achieve this kind of functionality: allocate memory for the largest type, use a pointer to a variable, and dynamically expand memory later if needed, similarly to a linked list.
And I am pretty sure there's a better way to do this... probably the way it really is done in Perl :)
|
|---|