Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Determining the true type of a reference

by little (Curate)
on May 24, 2003 at 17:13 UTC ( #260611=note: print w/ replies, xml ) Need Help??


in reply to Determining the true type of a reference

ref

Have a nice day
All decision is left to your taste


Comment on Re: Determining the true type of a reference
Re: Re: Determining the true type of a reference
by Mr. Muskrat (Abbot) on May 24, 2003 at 17:17 UTC

    +=0 (you meant well)

    That won't work little. Try changing this line in showarray: print ref($aref), ": @$aref"; to

    print ref($aref); print "@$aref";
    and you will see that it outputs 'ARRAY' which is wrong. In this case, $aref is a SCALAR reference that is blessed into the class ARRAY.

      that won't work due to your own belssing I assume
      my $blessed = bless($ref, 'ARRAY'); # bless the scalar reference into class ARRAY

      Have a nice day
      All decision is left to your taste

        Right. Reread my OP to see why I did that.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2015-07-04 09:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (59 votes), past polls