in reply to Re^2: perl function for 'ps' ?
in thread perl function for 'ps' ?

And yet another Perl-ish way to check the OS is to look at $^O (or if you use English, you can check it as $OSNAME). For instance something like the following would work:

use English; BEGIN { if ( $OSNAME =~ /MSWin32/i) { #do some stuff for Windows } elsif ( $OSNAME =~ /solaris/i) { #do some stuff for solaris }# }#end BEGIN
You could put in whatever the various OSes are that you would need.