If a picture’s worth a thousand words, then a picture of a thousand words is worth a million words. And you can quote me on that.
When coupled with Perl, GraphViz becomes truly spectacular. Leon Brocard’s GraphViz Perl module just might save you a lot of time. One thing I needed modified on it, however, was the handling of node names. If you wanted a node named “email@example.com” the module would produce a generic node name of “node141″, which was restrictive for the two things I primarily use the module for (email addresses, and DNS mapping).
What follows is a quick diff to allow one to use arbitrary node and cluster names. They’re just straightforward regexes. They work for everything I use them for, and I haven’t had them bomb out. I think the reserved words (e.g., “graph”) need expanded, as well, but this will work for now.