!/usr/bin/perl -l use strictures 1; use Devel::SimpleTrace; BEGIN { use strict 'refs'; use warnings; eval { do { my $hash = {MONTH => 'January'}; print $$hash{'MONTH'}; } } } BEGIN { use strict 'refs'; use warnings; eval { do { my $hashInitStr = {'MONTH' => 'January'}; my $hash1 = $hashInitStr; print $$hash1{'MONTH'}; } } }
In reply to Re: Initializing an anonymous hash
by Khen1950fx
in thread Initializing an anonymous hash
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |