#!/usr/software/bin/perl my $sio_cmd = `./sio_linux random 100 1k 0 512k 20 1 testfile &`; print "The command output = $sio_cmd"; $proc_cmd = `ps -ef | grep -i sio`; print "\nThe process output is : $proc_cmd\n"; if($proc_cmd =~ /\w+?\s+?(\d+)\s+?.*$sio_cmd.*/){ print "\nThe process id is : $1 \n"; }else{ print "\nNo process id\n"; }