Think about Loose Coupling | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
SCALAR is a reference to a scalar; HASH is a reference to a hash; and so on (ARRAY, CODE, ...). REF is a reference to any of those, e.g.
I vaguely recall using this feature some time ago when testing some deep copying of a complex data structure although I can't remember the exact details. The basic idea was to continually dereference to a scalar while ref() returned REF (e.g. $deref = $$ref); then to deference to the appropriate datatype (e.g. @array = @$ref if ref($ref) eq 'ARRAY'). I can't provide any help with the internals. Regards, PN5 In reply to Re: ref == "REF"
by Prior Nacre V
|
|