When I'm debugging, the one module I can't do without is
Data::Dumper. The ability to print out what a variable contains
recursively is invaluable. It's one of the nine indispensible rules of
debugging: Quit Thinking and Look. No matter what I think a variable
must contain, there's no substitution for quickly getting in there and
printing it out to just make sure.

Data::Dumper::Simple provides a slight, but significant,
improvement over Data::Dumper. It automatically prints out the
name of the variable you're dumping. This may seem trivial, but in a
situation where you're concentrating your hardest in tracking down a
problem the last thing you want to be doing is getting confused about
which Dumper statement is which. And, admit it, we're all too lazy to
add the extra information to the print statement by hand - but that's
okay, laziness is a virtue in the Perl world - especially when we're so
lazy we get a module to do it for us.

This is great! Anywhere we want in our code whenever we want to see
what a variable contains we can just print it out. And we can sprinkle
these all over our code so we can tell what things are, and track when
we made the mistake...

...apart from the fact we'd never be able to tell which variable is
which because they're only labeled $VAR1, $VAR2, and $VAR3.
As soon as we start using multiple Dumper commands the whole thing
is going to get confusing. Of course we could - if were prepared to
type a lot more in our statements - label all our Data::Dumper
output with whatever we wanted. However, what we really want is to
have the correct labels automatically with no extra effort.
Data::Dumper::Simple comes to the rescue:

use Data::Dumper::Simple;
print STDERR Dumper($foo, \%bar, \@baz);

This - through clever use of source filters - prints out some output
that is labeled with the names of the variables that we were dumping
out:

And that's all there is to it. A simple improvement for one of the
common uses of Data::Dumper.

We can take things a little further. You'll note that the funny
characters at the front of the variable names have all changed to $.
That's because we're passing both %bar and @bar by a reference.
We need to do this because the Data::DumperDumper function will
get it's arguments flattened by the list calling convention. If we'd
written: