I am trying to kill a process by name which i will pass as a variable to a system command.
Below is what i have:
my $processName=$ARGV[0]; print \"$
my $pid = `ps -ef | grep '$processName' | grep -v grep | awk '{print \$2}'`; print $pid; system("kill -9 $pid");
This one works!!!