If you're going to be using a simple
do() then you need to pass a reference to
Dumper() as passing a bare hash results in a list of values being dumped which is not what you want e.g
use Data::Dumper;
my %hash = ( 'dataParams', {
'license_feature' => { 'val' => 'geditor' }
} );
open DATA, ">whatever.dat";
print DATA Dumper(%hash);
close DATA;
print "bare hash dump\n", Dumper(do "whatever.dat");
open DATA, ">whatever.dat";
print DATA Dumper(\%hash);
close DATA;
print "reference dump\n", Dumper(do "whatever.dat");
__output__
bare hash dump
$VAR1 = {
'license_feature' => {
'val' => 'geditor'
}
};
reference dump
$VAR1 = {
'dataParams' => {
'license_feature' => {
'val' => 'geditor'
}
}
};
So as you can see when you dump by reference you get back the complete data structure.
HTH
_________
broquaint