Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Re: Getting a variable name from a reference

by erikharrison (Deacon)
on Mar 05, 2002 at 13:31 UTC ( [id://149359]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $hashref = {'Anonymous' => 'Hash'}; #hash has no varable
                                        #name - just reference
    
  2. or download this
    #usr/bin/perl  -w
    use strict;
    ...
    
    eval qq (print qq(Hashname: $$hashname1 Values:); print join ",",sort 
    +keys %{$hasname1})" );
    eval qq (print qq(Hashname: $$hashname1 Values:); print join ",",sort 
    +keys %{$hasname1}) );
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-04-18 00:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found