意义:帮助了解存入对象的的数据结构
Data::Dumper有面向对象和直接使用函数两种调用方法
直接调用函数方式,例如:
use Data::Dumper;my $a = "good"; my $b = "bad"; my @my_array = ("hello", "world", "123", 4.5); my %some_hash = ("foo", 35, "bar", 12.4, 2.5, "hello", "wilma", 1.72e30, "betty", "bye\n"); print Dumper($a); print Dumper(\@my_array); print Dumper(\%some_hash); print Dumper((\%some_hash, \@my_array));
输出结果:
时间: 2024-10-14 07:56:08