以前在xp下,可以用wperl运行"*.pl"的文件,而不现实一个dos窗口,但在vista中不行了,需要更改文件的扩展名为"wpl",才能通过wperl运行,否则只能以perl运行。
The wperl.exe command under Windows starts Perl without attaching it to a console. This means that if you associate for example the file extension .wpl with wperl.exe, double-clicking test.wpl will not pop up a console window with text scrolling by. This is very convenient if your Perl script is written using Win32::GUI or some other windowing toolkit.
Using wperl.exe and thus not having a console attached also has a drawback - STDIN,STDOUT and STDERR are not available, so you will need to reopen them to some log files if you output any text via print or warn.
wperl.exe will exit when your script exits. Simple as that. If your script never exits of itself, and has no method in it for you to terminate it, then you will have to terminate it through the task manager.
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/15385/viewspace-1002813/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/15385/viewspace-1002813/