On 10-05-17 12:22 AM, Uri Guttman wrote:
SHC> # Set maximum depth for Data::Dumper, zero means unlimited
SHC> local $Data::Dumper::Maxdepth = 0;
why do you localize some but not all of the dumper options? local will
make it work only for a call in this scope which is file scope. better
t
> "SHC" == Shawn H Corey writes:
SHC> On 10-05-16 11:17 PM, Uri Guttman wrote:
>> it can be used to save data (e.g. a config
>> file) in a file for reloading in the future (via running the dumper
>> output with eval).
SHC> By saving the output of Data::Dumper to a *.pm file, it can
On 10-05-16 11:17 PM, Uri Guttman wrote:
it can be used to save data (e.g. a config
file) in a file for reloading in the future (via running the dumper
output with eval).
By saving the output of Data::Dumper to a *.pm file, it can be reloaded
via "use".
#!/usr/bin/perl
use strict;
use warni
> "PJ" == Peng, Jeff writes:
PJ> Dump the data structure for printing.
PJ> It's useful for checking the complex data strucure of Perl.
PJ> For example,
PJ> use Data::Dumper;
PJ> my %hash = ( 1 => [1,2,3,4],
PJ> 2 => { 1 => { 2 => [3,4,5] } },
PJ>);
Dump the data structure for printing.
It's useful for checking the complex data strucure of Perl.
For example,
use Data::Dumper;
my %hash = ( 1 => [1,2,3,4],
2 => { 1 => { 2 => [3,4,5] } },
);
print Dumper \%hash;
Run it and see what is printing.
Also you could check
What is the use of Data::Dumper module?
can any body please give examples?
Have been using perl for some time and never used this module. Not sure if i
am missing something by not using it.
Thanks,
-Ben