on Mon, 30 Sep 2002 19:39:05 GMT, Jessee Parker wrote: > Hi all, I've run into a bit of a problem. I need to see if a program > is currently running. If it is, I want to display this on a web page > that tells the status of the program (either on or off). The script I > created which is probably longer than it needs to be, basically > issues a system(ps -A) call and writes it out to a file which in > turns gets parsed through.
There is no need to use an intermediate file if you use a pipe: #! /usr/local/bin/perl -w use strict; open PS, "/bin/ps -A |" or die "cannot fork: $!"; while (<PS>) { # do your stuff } close PS; -- felix -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]