Description:

Yes. In the spirit of TMTOWTDI, there are several ways to
represent your data structure. Which you choose is largely up to
you. The information provided below should serve as an overview
only; always consult a module's complete documentation for usage,
bugs, and caveats.

More of a prettyprinter than a serializer, this
method provides the view of your data structure that is most like
the output from Perl's debugger. The output format may be modified
by setting numerous options. Dumpvalue can even dump the
symbol tables of whole packages.

Possibly the most popular choice, Data::Dumper outputs
actual Perl code. As such, it is both a prettyprinter
and a serializer. Data::Dumper can handle
self-referential data structures, and evaling
Data::Dumper's output reconstitutes an exact copy of the
original data structure. This module is useful both for saving data
structures to disk and DBM files and for passing them to other
processes. As with Dumpvalue, Data::Dumper's
output is configurable.

Another prettyprinter/serializer combo.
YAML's output format is also controllable and hash keys
are sorted by default. Since YAML does not eval to de-serialize, it is safer than
Data::Dumper when you're not sure who else might have
access to your files. Data structures serialized from Perl using
YAML can be accurately read and processed using
YAML in Java, Javascript, PHP, Python, Ruby, and Tcl (and
of course, Perl). Likewise, data structures may be serialized in
any of these languages and be usable by Perl.

GraphViz::Data::Structure is one of two modules I know
of that literally draw you a picture of your data structure. Great
for the visually-oriented, but none of the de-serializing or
multi-lingual features of the above alternatives.

GraphViz::Data::Grapher is the other of the two, and
happens to be my personal favorite. No reconstituting original
structures or sharing them with other languages such as Python or
Ruby; but this does create very nice illustrations of complex data
structures for documentation or perhaps teaching purposes.