Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Accessing Constant Hashes

by enoch (Chaplain)
on Jan 16, 2002 at 02:23 UTC ( #139059=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use constant CONST => {
                             foo => 'bar',
    ...
    {
        print "$_\n";
    }
    
  2. or download this
    Type of arg 1 to keys must be hash (not constant item)
    
  3. or download this
    foreach (keys %{CONST})
    {
        print "$_\n";
    }
    
  4. or download this
    Variable "%CONST" is not imported
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (4)
As of 2020-10-20 11:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (210 votes). Check out past polls.

    Notices?