in reply to close web browser windows

You can't generally use server-side Perl to dictate the behavior of clients such as browsers. To close browser windows and the like, you need to look into using Javascript. Try, e.g. http://www.javascript.com

Philosophy can be made out of anything. Or less -- Jerry A. Fodor