- 论坛徽章:
- 0
|
默认打开方式改为 wperl,或者像我新建种文件类型叫 plw 专用应付这种情况的
或者你的计划任 ...
zhlong8 发表于 2010-10-28 18:44 ![]()
不错,学习了~
Google了一下,好像应该是.wpl格式~
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.
顺手翻个大意:
Windows下的wperl.exe命令在启动Perl时没有将之关联到一个控制台。意为假如你将一个文件的扩展名设为.wpl和wperl.exe关联起来的话,双击 test.wpl 将不会弹出一个滚动着文本的控制台窗口。这样如果你的Perl脚本使用了Win32::GUI或其它带窗口的工具时将会非常方便。
但使用wperl.exe 不和控制台进行关联也有它的弊端,STDIN,STDOUT 和 STDERR将不存在,因此如果你想通过print或warn输出任何文本时就需要重新打开它们到某个log文件。 |
|