ps will let you return just command names, using 'ps -eo command', if that's all you want. (I guess you should check with the ps man page on your platform, just in case).
Now that you've got less junk to skip, just use splitpath in File::Spec to get the app name, which handles all those irritating special cases ;)
In reply to Re: extract file name from path
by RichardK
in thread extract file name from path
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |