Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Initializing an anonymous hash

by davies (Prior)
on Mar 30, 2012 at 15:35 UTC ( [id://962637]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    
    ...
    my $hashInitStr = "{'MONTH' => 'January'}"; # This would come from a f
    +ile
    my $hash1 = eval $hashInitStr;
    print $hash1->{MONTH} . "\n"
    
  2. or download this
    Z:\Data\Perl>962633.pl
    January
    January
    
    Z:\Data\Perl>
    

Log In?
Username:
Password:

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

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

    No recent polls found