in reply to Re: Problems with Ping
in thread Problems with Ping

i have run this program exactly as you've typed it...

i get the same error:

 Can't locate object method "new" via package "Net::Ping" at ...

could there be something wrong with the module?

magnus here is the exact code block:
(imagine, if you will, Net::Ping has already been called)

sub reachable { (@machines_to_ping) = @_; $host = Net::Ping->new(); foreach (@machines_to_ping){ $reachable = $host->ping($_); if ($reach == 1){ print "$_ reachable\n"; } else { print "$_ not reachable\n"; } } }
hopefully this helps...