从批处理文件调用Perl脚本

时间:2015-09-04 14:35:49

标签: windows perl batch-file

我试图创建一个批处理文件,该文件将调用我创建的perl脚本,该脚本每分钟向程序报告一次数据。该程序无法在Windows中打开perl脚本,但如果批处理文件打开程序,则可以收集数据。

到目前为止,我有这个:

@echo off
call "C:\[Perl Installation Location for reporting program]\manager\etc\perl.exe" "C:\[Script location on disk]\program.pl"

然而,这会返回错误

  

找不到scrict.pm

有什么建议吗?

编辑:删除使用严格和使用警告修复了此问题。谢谢!

1 个答案:

答案 0 :(得分:-1)

试试这个

在bat文件中

cd /d script_path
perl tescript_name