On 03/27/14 23:58, sven falempin wrote:
On Thu, Mar 27, 2014 at 6:42 PM, Alexander Hall <alexan...@beard.se> wrote:
On 03/27/14 23:36, Adam Thompson wrote:

   my $src = system('/usr/bin/pkill -HUP -f "^dhclient: trunk0"');


my $src = system('/usr/bin/pkill', '-HUP', '-f', '^dhclient: trunk0');

/Alexander



Thank you all, i'll put the begin of line next time i use pkill in the
spawned subshell.

Not sure if you're being ironic or not, and the ^ is a good thing anyway, but the reason for passing multiple parameters to system() rather than just a single expression, is to avoid creating a subshell at all.

Reply via email to