in reply to
connected component
The Graph:: family of classes on CPAN should be able to help you. Using Graph::Undirected you can use the connected_components() method.
Comment on
Re: connected component
In Section
Seekers of Perl Wisdom