#!usr/bin/perl use feature qw/say/; use Data::Dumper; use Data::Undump; $Data::Dumper::Terse = 1; $hash = { 'testing' => { 'link' => "http://www.espn.com", 'bandwidth' => "100", 'r' => "2", }, }; $data = Dumper($hash); $undump = undump($data); die "'testing' not found!" unless($undump->{'testing'}); say $undump->{'testing'}->{'link'} // (die "'link' not found!"); say $undump->{'testing'}->{'bandwidth'} // (die "'bandwidth not found!"); #### #!usr/bin/perl use feature qw/say/; $hash = { 'testing' => { 'link' => "http://www.espn.com", 'bandwidth' => "100", 'r' => "2", }, }; die "'testing' not found!" unless($hash->{'testing'}); say $hash->{'testing'}->{'link'} // (die "'link' not found!"); say $hash->{'testing'}->{'bandwidth'} // (die "'bandwidth not found!");