我有一个非常庞大的对象,我希望看到该对象的数据结构或内容。
我无法在cmd行或文件上打印。记忆犹新!错误。
use strict;
use warnings;
use Data::Dumper;
my $self = { #this is a big object with complex data structure };
#first tried printing normally on cmd line. It didn't help
#print Dumper $self;
open(my $fh, '>', 'report.txt');
print ($fh Dumper($self));
close $fh;
关于如何实现这一目标的任何想法或建议?