Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Capturing System Output

by hardburn (Abbot)
on Mar 04, 2003 at 16:17 UTC ( [id://240403]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    open(EXEC, '-|', 
        'ps', '-deaf | ', 'grep', 'httpd |', 'grep', 
    ...
        print "$line\n";
    }
    close(EXEC);
    
  2. or download this
    my $input = `ps -deaf | grep httpd | grep -v grep | wc -l`;
    my $input2 = qx/ps -deaf | grep httpd | grep -v grep | wc -l/; # Same 
    +thing
    

Log In?
Username:
Password:

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

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

    No recent polls found