in reply to Re^4: Integrating shell cmd to perl script
in thread Integrating shell cmd to perl script

It looks like you need something like fork, e.g.:
my $pid = fork; if ($pid) { # do all the other tasks here system "kill $pid"; # ready to stop the polling } else { # do the polling }

One world, one people