in reply to Re^2: Kill a perl script execution in windows
in thread Kill a perl script execution in windows
Can you please explain how $target variable is evaluated and on what the map function is applied ?
... = map { 1+ index( $_->[0] // '', $0 ) && $_->[1] != $$ ? $_->[1] : () } ...
Which tests if the first value in the anonymous array ($_->[0]) contains $0 (the name&path of the current program), and if the second value in the anonymous array ($_->[1]) (the process id) is not equal to $$ (the process id of the current perl program),
then it passes that second value (the pid) out of the map
otherwise it returns nothing.
I am getting syntax error
What is the text of the syntax error? What version of perl are you running?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Kill a perl script execution in windows
by rbala (Acolyte) on Feb 18, 2013 at 13:37 UTC | |
|
Re^4: Kill a perl script execution in windows
by rbala (Acolyte) on Feb 18, 2013 at 14:13 UTC | |
by BrowserUk (Patriarch) on Feb 18, 2013 at 22:35 UTC |