in reply to net::ping not working for windows hosts
I realize the syntax may not be correct as I rarely code perl for Windows, but the logic should be sound. Also, I'm guessing you have a limited number of unix os to deal with. A cleaner regex for the unix part is up to you.if ($^O =~ /WIN32/) { Net::Ping->new("icmp"); etcetera } elsif ($^O =~ /(irix | linux | SunOS | yougettheidea) /) { Net::Ping->new("tcp", 2); etcetera }
-Logan
"What do I want? I'm an American. I want more."
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Sloppy, but simple
by AcidHawk (Vicar) on Jan 10, 2003 at 09:49 UTC |