Help for this page

Select Code to Download


  1. or download this
    use Graph;
    
    my $G = Graph->new(); # Create Graph object with listed verteces
    ...
        # add_edge produces any vertices not already present
        $g->add_edge($_[$_-1],$_[$_]) for 1..scalar(@_)-1;
    }