use Graph::Directed; $G = new Graph::Directed; # ... add vertices, edges @S = $G->strongly_connected_components; # Returns the strongly connected components @S of the # graph $G as a list of anonymous lists of vertices, # each anonymous list containing the vertices #belonging to one strongly connected component.