1

perl script to traceroute an IP from windows

view story
linux-howto

http://www.unix.com – I am writing a perl code(windows) to traceroute IP address and to print the output. I had executed the below code which was taken from cpan modules Code: #!C:/perl/bin/perl.exe use Net::Traceroute; $tr = Net::Traceroute->new(host=> "google.com"); if($tr->found) { my $hops = $tr->hops; if($hops > 1) { print "Router was " . $tr->hop_query_host($tr->hops - 1, 0) . "\n"; } } But it is generating the below error message C:\scripts>perl traceroute1.pl No output from traceroute. Exec failure? at C:/Perl/site/lib/Net/Traceroute.pm line (HowTos)