Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re^3: perl function for 'ps' ?

by nimdokk (Vicar)
on Aug 14, 2006 at 14:29 UTC ( [id://567234]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://567234]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (7)
As of 2024-04-25 08:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found