in reply to perl and sudo basic question
After use Sudo:
use Data::Dumper; [download]
And then replace your line 15 (print $result) with the following:
print Data::Dumper->Dump([$result],['result']); [download]
That should show you what is in the hash.