in reply to Searching strings within an array for a particular word.

Why would one use the external grep from within Perl? It just makes things harder. If you don't use it, there's no grep to exclude. Perl has a grep function that can use regexes or any expression (or even a block of code) you want!

my @httpd = grep /httpd/, qx(ps aux); # external grep(1) is not called, so it's not in the array.


Please note that you cannot trust the ps output, because everyone could name his process httpd, and fake your script (I have been bitten). If you must be really sure and you have a /proc filesystem, use that and check command line and path etcetera.

++ vs lbh qrpbqrq guvf hfvat n ge va Crey :)
Nabgure bar vs lbh qvq fb jvgubhg ernqvat n znahny svefg.
-- vs lbh hfrq OFQ pnrfne ;)
    - Whreq