http://www.perlmonks.org?node_id=681001


in reply to How to see the processId of the process called by system command from perl

On Linux you can use:
my $pid = `pidof R`;
  • Comment on Re: How to see the processId of the process called by system command from perl
  • Download Code

Replies are listed 'Best First'.
Re^2: How to see the processId of the process called by system command from perl
by Anonymous Monk on Jan 31, 2012 at 14:19 UTC
    with pidof how to get the output of othe command which gets executed. For example if the command to be executed is "date" I want to get the output of the command to a perl variable and also the pid number.

      Have you read the pidof manpage? It tells you what pidof does. It only finds the pid of a running process. It does not launch a process.