[LA.pm] app_running status to perl

Randal L. Schwartz merlyn at stonehenge.com
Wed Nov 1 07:39:16 PST 2006


>>>>> "Peter" == Peter Benjamin <pete at peterbenjamin.com> writes:

Peter> At 07:49 PM 10/31/2006, David Heayn wrote:
>> I'm currently trying to check if firefox is running before I edit 
>> pref files with perl (mac 10).

Peter> This should work, and be portable as well.

Peter> my @so = `ps aux`;
Peter> my @firefox = grep( //, @so );

Did you mean to put something in those //?  Doesn't make sense otherwise.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn at stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


More information about the Losangeles-pm mailing list