2009年6月23日星期二

Learning Perl on Win32 Systems

指定.plx以perl打开

assoc .plx=Perl

ftype Perl = d:\perl\bin\perl.exe %1 %*

set PATHEXT = %PATHEXT%; .PLX

system("somecmd");

`somecmd`;

其中``会将子进程的输出返回为字符串

open(DIRPR, "dir|sort|");

Table 14.1 子进程总结

Win32::Process,Win32::Registry,Win32::OLE,OLE

调用IE访问网站:

#!/usr/bin/perl 
use Win32::OLE;
Win32::OLE::CreateObject( "InternetExplorer.Application.1", $ie )
  || die "CreateObject: $!";
$ie->{Visible} = 1;
$ie->Navigate("http://www.ora.com/publishing/perl/");

附录B:库和模块,B4是Win32 Extensions

IO::Socket

没有评论:

发表评论