[英]Getting error while running perl module from command line
I have a customized perl module( Modulehere ) that take xls sheet and parsing it. 我有一个自定义的perl模块( Modulehere ),它可以处理xls表并对其进行解析。
I tried to run that from commandline itself like: 我试图从命令行本身运行它,例如:
perl -I /home/suser/modules -e "use Modulehere;Modulehere::load_it('/tmp/test.xls')"
But it gives the error like: 但是它给出了如下错误:
Can't open perl script "–e": No such file or directory
Please help! 请帮忙!
It works on my machines (OS X and Linux) but looking at the documentation ( man perlrun
) 它可以在我的机器(OS X和Linux)上运行,但请查看文档(
man perlrun
)
-Idirectory Directories specified by -I are prepended to the search path for modules (@INC).
There is no space between -I
and the directory. -I
和目录之间没有空格。 Maybe your Perl version is being to strict and considering everything after the space as a script file. 也许您的Perl版本是严格的,并考虑了空格之后的所有内容作为脚本文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.