in reply to Getting Data::Dumper target from STDIN
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; };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Getting Data::Dumper target from STDIN
by jr (Initiate) on Jan 27, 2015 at 17:00 UTC |