Data::Dumper を使ってデータ構造を覗き見る|perl|@OMAKASE より

my $var = {
    array => [1,2,3],
    hash => {
        key1 => "val1", 
        key2 => "val2"
    },
    coderef => sub { "this is coderef"}
};
use Data::Dumper;
print Dumper $var;