in reply to dereferencing hash & array refs
Also a minor technicality, there are more forms of SCALAR ref than just SCALAR. REF is for instance a scalar (it is a reference to a scalar that holds a reference itself), as is GLOB.. By this i mean that they are dereferenced in the same way that a scalar is. The special SCALAR ref type 'Regexp' will incidentally pass the UNIVERSAL::isa(qr//,"SCALAR") test but is handled very differently (but thats a can of worms you probably want to avoid :-)
my $scalar=\"Foo"; my $REF=\$scalar; my $GLOB=\*A; print "$$scalar $scalar $$REF $$GLOB\n"; __END__ Foo SCALAR(0x1ab3108) SCALAR(0x1ab3108) *main::A
--- demerphq
my friends call me, usually because I'm late....
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: dereferencing hash & array refs
by parv (Parson) on Feb 09, 2003 at 21:36 UTC |