in reply to How to close the default browser in perl

Of more concern to me, as an end-user, would be the simple fact that your Perl program, running at computer-speed, would close “my” browser window (or tab) when it wanted to, not when I wanted to.   This is not good user-interface karma.

I would expect you to provide some kind of JavaScript-driven button, which I could press when I was ready, which would close the window.   (Certain restrictions apply:   to close a window in JavaScript, you must have opened it in JavaScript.)   This button should also notify your Perl script when I am (damn well ...) ready to proceed.   I should be free to keep that window open for as long as I wish.   And then, the action is initiated and completed from within the browser (JavaScript) environment, not externally by shooting holes in PIDs.