http://www.perlmonks.org?node_id=1035661

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi there Monks!
Its a question of doing it better, so I am confused!
How to access or better print the value of "name" from this simple sample code structure:
use strict; use warnings; use Data::Dumper; my $data = [ { 'name' => 'Mary' }, ]; #my $test = $data[0]{1}; #my $test = $ { $data} { name }; #my $test = @{ $data} { name }; my $test = $data->{ name }; print "\n - $test \n"; warn Dumper $test;
Thanks for looking!