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

Doubt in assigning hash reference values for Constant pragma declaration ?

by gube (Parson)
on Sep 21, 2007 at 06:48 UTC ( #640274=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/local/bin/perl
    use strict;
    ...
    my %hash = ( 'a' => 2 );
    use constant A => \%hash;
    print A->{a};
    
  2. or download this
    #!/usr/local/bin/perl
    use strict;
    ...
    
    use constant A => $hash;
    print A->{a};
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2020-07-08 15:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?