http://www.perlmonks.org?node_id=868031

neversaint has asked for the wisdom of the Perl Monks concerning the following question:

Dear Masters,
I have a graph, for example this one. What I want to do is to fin all possible path from a given starting vertice and ending vertice.
my %graph =( 'F' => ['B','C','E'], 'A' => ['B','C'], 'D' => ['B'], 'C' => ['A','E','F'], 'E' => ['C','F'], 'B' => ['A',''E','F'] );
So for example if I chose B as my starting and E as my ending I would get, These paths:
B->E B->F->E B->F->C->E B->A->C->E B->A->C->F->E
What's the fastest way to implement that in Perl?

---
neversaint and everlastingly indebted.......