Use parentheses to construct your hash, not braces:
use strict;
use warnings;
use Data::Dumper;
my %h = ('one'=>1, 'two'=>2);
print Dumper($h{'one'});
Braces are used to construct a hash reference.
Also, add use warnings;
, which would have generated a message that there was a problem with your code.
Or, if you really wanted a hashref:
my $h = {'one'=>1, 'two'=>2};
print "$h->{one}
";
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…