犄角旮旯里面掏出来一个.pl的perl代码,一副古早味。
搜了一下最新的perl运行安装:
https://www.activestate.com/products/perl/
居然已经不是安装包式,而是命令行式的安装了。
咔咔咔一阵操作一看
>perl -v
This is perl 5, version 36, subversion 0 (v5.36.0) built for MSWin32-x64-multi-thread
Copyright 1987-2022, Larry Wall
Binary build 36.0r1 provided by ActiveState http://www.ActiveState.com
Built Fri Sep 23 19:18:21 2022
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at https://www.perl.org/, the Perl Home Page.
不愧是我,一下就装好了(狗头)
拉出脚本各种花式跑
>perl word2xml.pl -h
Can't locate Win32/OLE.pm in @INC (you may need to install the Win32::OLE module) (@INC contains: c:/Users/abcdefg/AppData/Local/activestate/cache/d5f6d97c/site/lib c:/Users/abcdefg/AppData/Local/activestate/cache/d5f6d97c/lib) at word2xml.pl line 6.
BEGIN failed--compilation aborted at word2xml.pl line 6.
提示 “Can’t locate Win32/OLE.pm in @INC”
网上一搜,提示都是让增加PATH呀,改源文件的
咔咔咔又整了一通,却没啥卵用
正考虑拿出关机、重启、重装三步走大法,犹豫了一下
搜了一下电脑里的perl下的site\lib文件夹,再打开Win32一看,空空如也
全盘搜索OLE.pm,一无所获
再定睛一看提示 you may need to install the Win32::OLE module
好吧,应该是OLE模块没有默认下载,到bing上一搜
https://code.activestate.com/ppm/Win32-OLE/
原来还有一步安装OLE模块的过程
在CMD窗口键入 ppm install Win32-OLE
好吧。感觉是一个很傻逼的问题,不知道为何中文网站上搜不到这种傻乎乎的答案,做个记录吧。