in reply to
find all paths of length n in a graph
Graph
is your friend.
Comment on
Re: find all paths of length n in a graph
In Section
Seekers of Perl Wisdom