Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: forking and monitoring processes

by Anonymous Monk
on Jan 25, 2005 at 01:18 UTC ( [id://424761]=note: print w/replies, xml ) Need Help??


in reply to Re: forking and monitoring processes
in thread forking and monitoring processes

Hello,

Could you please tell me what @ARGV = <$dir/*> does?

I actually want to execute a command ... shd I use backticks instead to capture the output?

so @output = `Start_Process.exe param1 param2`;

Then parse through each line of @output to see if I find the error messages I am looking for and then close out all the other forks immediately using close ARGV?

Thanks.

Replies are listed 'Best First'.
Re^3: forking and monitoring processes
by zentara (Cardinal) on Jan 25, 2005 at 12:18 UTC
    It "globs" all the files in $dir into @ARGV, which is a special array for input. It's advantage over a regular array is that you can go thru it "line-by-line" without having to open and close each file, which you would have to do with a regular array of files. Your @output plan sounds about right, but there are usually a few glitches to work out, so test,test,test. :-)

    I'm not really a human, but I play one on earth. flash japh

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (4)
As of 2025-06-13 09:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.