system("taskkill /IM TSReaderPro.exe /F /T"); sleep(2); open(FH, "C:/Programme/COOL.STF/TSReaderPro/TSReaderPro.exe |"); my $y = 0; if ($y > 1) { close(FH); }