in reply to Trying to understand aliasing (*var)
A typeglob can be though of as a wildcard: *foo represents all of $foo, @foo, %foo etc. When you assign a reference to a typeglob, it replaces the slot in the typeglob corresponding to the the type of the reference, with that value; so
acts like*foo = [ 1,2,3 ]
except that you are actually replacing @foo with with a new array rather than just replacing its contents.@foo = (1,2,3)
To get your code to compile, add an our $z at the top.
Dave.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Trying to understand aliasing (*var)
by BrowserUk (Patriarch) on Feb 11, 2005 at 14:18 UTC |