I would use something like Data::Diver to get the reference.
As an alternative approach, if you're willing to use Perl syntax, you could get the reference using eval, with the problem that you can also call functions etc. from eval:
my $dump= eval $input; if( my $err= $@ ) { warn $err; } else { print Dumper $dump; };
In reply to Re: Getting Data::Dumper target from STDIN
by Corion
in thread Getting Data::Dumper target from STDIN
by jr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |