Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: Graph in a terminal (ASCII - art)

by johngg (Canon)
on Feb 13, 2018 at 18:15 UTC ( [id://1209080]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    $graph->add_edge( split m{ -> } ) for keys %edges;
    
    print $graph->as_ascii();
    
  2. or download this
    Using Graph::Easy version 0.76
    1 -> 2
    ...
              +---+                 |                           +---+     
    +             |
              | 3 | ----------------+                           | 9 | ----
    +-------------+
              +---+                                             +---+
    
  3. or download this
    ...
    my $graph = Graph::Easy->new();
    ...
    $graph->add_edge( 1, 2 );
    
    print $graph->as_ascii();
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1209080]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (5)
As of 2024-04-20 00:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found