Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Capturing System Output

by hardburn (Abbot)
on Mar 04, 2003 at 16:17 UTC ( #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? | Other CB clients
Other Users?
Others about the Monastery: (3)
As of 2022-07-06 13:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?