You get the OS name in $^O so all you need to do is (pseudocode)
print "The OS is $^O"; if ( $^O =~ /Linux/ ) { &linux_ping; } elsif ( $^O =~ /Solaris/ ) { &sun_ping; } else { die "Get a real OS!\n"; }
I don't know what $^O holds on Solaris so you will have to tweak the matches to suit.
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
In reply to Re: Re: Re: Ping and Tracert
by tachyon
in thread Ping and Tracert
by qball
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |