Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    use strict;
    ...
    my $hashInitStr = "{'MONTH' => 'January'}"; # This would come from a f
    +ile
    my $hash1 = $hashInitStr;
    print $hash1->{MONTH} . "\n"
    
  2. or download this
    January
    Can't use string ("{'MONTH' => 'January'}") as a HASH ref while "stric
    +t refs" in use at ./anonHashfromStr.pl line 9.