in reply to Re: Extracting a hash reference from a string
in thread Extracting a hash reference from a string

While Devel::Pointers technically accomplished what I was looking to do, the use of do() instead of require() proved to be a much better solution. Further, it addresses the concerns expressed by 'pg'.

my $rc = do($mycode); if ($@ || !defined($rc)) { if ($@) { if (ref($@) eq 'HASH') { print("Error from $mycode: $$@{'Error'}\n"); } else { print("Compilation errors in $mycode: $@"); } } else { print("Couldn't access $mycode: $!"; } }