#!/usr/bin/perl -w use strict; use GraphViz; my $g = GraphViz->new(); #my @decorate; # move the comment to the next line to try it without my @decorate = (decorateP => 1); $g->add_node('London'); $g->add_node('Paris', label => 'City of\nlurve'); $g->add_node('New York'); $g->add_edge('London' => 'Paris', @decorate); $g->add_edge('London' => 'New York', label => 'Far', @decorate); $g->add_edge('Paris' => 'London', @decorate); $g->as_png('simple.png');