use Data::Dumper; my $a; # build up complex thingy in $a # dump it out to try to debug what's wrong with it print dump($a);