Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Answer: How do I tell what type of structure a given reference points to?

by asarih (Hermit)
on Sep 18, 2003 at 17:42 UTC ( #292466=note: print w/replies, xml ) Need Help??


in reply to Re: How do I determine the type of a reference?
in thread How do I determine the type of a reference?

Note that Scalar::Util::reftype behaves almost like the built-in ref, except when an object is passed.
use Scalar::Util 'reftype'; $a=\$b; print reftype($a),"\n"; #SCALAR print ref($a),"\n"; #SCALAR bless $a, "BOGUS"; print reftype($a),"\n"; #SCALAR print ref($a),"\n"; #BOGUS
  • Comment on Re: Answer: How do I tell what type of structure a given reference points to?
  • Download Code

Replies are listed 'Best First'.
Re: Re: Answer: How do I tell what type of structure a given reference points to?
by Mr. Muskrat (Canon) on Sep 18, 2003 at 17:57 UTC
    And that is exactly why I chose to use it!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://292466]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2022-08-08 09:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?