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

Hi, This is my first post. So if I inadvertently broke any rules, please accept my apologies.
I am trying to use Graph::Traversal::DFS from CPAN.org. It looks like I am doing something terribly wrong. Can any of the eteemed monks help me correct the mistake?
I have a file containing the following lines:
*D_NET *3 1.512 *CONN *P i_one_pattern_port\:l2 I *C 2020.045 321.07 *P o_one_pattern_port\:l2 O *C 2080.045 101.05 *CAP 0 i_one_pattern_port\:l2 0.0229565 1 o_one_pattern_port\:l2 0.0229565 *RES 0 *3:2 *3:20 2 1 *3:3 *3:2 2 2 *3:4 *3:3 2 3 *3:5 *3:4 2 4 *3:6 *3:5 2 5 *3:7 *3:6 2 6 *3:8 *3:7 2 7 *3:9 *3:8 2 8 *3:10 *3:9 2 9 *3:11 *3:10 2 10 *3:12 *3:11 2 11 *3:13 *3:12 2 12 *3:14 *3:13 2 13 *3:15 *3:14 2 14 *3:16 *3:15 2 15 *3:17 *3:16 2 16 *3:18 *3:17 2 17 *3:19 *3:18 2 18 *3:21 *3:19 2 19 *3:20 o_one_pattern_port\:l2 5.6 20 i_one_pattern_port\:l2 *3:21 8.13 *END
To process the *RES section into a graph, I wrote the small piece of code as below
#!/usr/bin/perl use strict; use warnings; use diagnostics; use Graph; use Graph::Traversal; our %net=(); our %RHash; our %ConnHash; our %ToGraphHash; open(IHF,"<", "sample_file"); while(<IHF>) { if (/D_NET/) { my ($DNet, $netMap, $netCap) = split; $net{'NET'} = $netMap; }elsif(/CONN/../CAP/) { next if (/CONN/); next if (/CAP/); next if(/^\n/); my ($PortType, $PortName, $PortDir) = split; $ConnHash{$net{'NET'}}{$PortName} = [$PortName,$PortDir]; }elsif(/^\*RES/../^\*END/) { next if (/^\*RES/); next if (/^\*END/); next if (/^\n/); next if (/^\s+\n$/); chomp; my @RArr = split; $RHash{$net{'NET'}}{$RArr[0]} = [ $RArr[1], $RArr[2], $RArr[3] ]; } } foreach my $n (sort keys %RHash) { my $x = $n; $x = Graph->new; foreach my $k (sort keys %{$RHash{$n}}) { $x->add_weighted_edge(@{$RHash{$n}{$k}}); } print $x; }

Description on cpan is a bit not clear on the use model of Graph::Traversal::DFS. An example of usage of this module on cpan will be nice.
Can any esteemed monks advise how to use Graph::Traversal::DFS in the above case?