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

Re: Accessing references

by bart (Canon)
on Apr 22, 2004 at 01:21 UTC ( [id://347183]=note: print w/replies, xml ) Need Help??


in reply to Accessing references

Both answers given thus far are equivalent, the arrows between subindexes are optional — but not the arrow between the variable name and the first index! That arrow makes the distinction between a scalar, that is a hash/array ref (which needs the arrow), and a an actual array/hash variable.

Anyway, please do take a look at the excellent tutorial for references that on modern perls is part of the core distro, as well as online: perlreftut

Replies are listed 'Best First'.
Re: Re: Accessing references
by diparun (Initiate) on Apr 22, 2004 at 04:43 UTC
    But, how do I access them through code.?.. meaning, dynamically..

    diparun

      If you want to access the hash associated with column_defs, you might do, e.g. keys %{$VAR1->{'column_defs'}};That is, wrap the hash reference in curlies and then treat it exactly as you would a hash variable name. Is that what you're asking?

      Have you been through perldoc perlreftut?


      The PerlMonk tr/// Advocate

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2024-04-24 15:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found