in reply to Running a command in Perl

Launching a Perl one-liner within a shell system command launched itself by another Perl program seems to be poor design. If you really want to call a system command from your Perl script just issue this system command:
ps aux | grep java
and process the output within your other Perl script with the commands you have in your one-liner. Although the filtering made by the grep shall command could itself be done within the Perl script. And then, of course, there are also some pure Perl solutions using modules.