首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >我在perl文件中遇到Bareword错误

我在perl文件中遇到Bareword错误
EN

Stack Overflow用户
提问于 2012-03-06 13:54:49
回答 2查看 245关注 0票数 0

我正在成批执行我的perl文件。我将perl文件的所有名称粘贴到一个批处理文件中并执行它。我给出了该文件的一个小演示。

批处理文件/10BT_run1.Amset包含:

代码语言:javascript
复制
Perl ../tools/test_driver_multi_aid_sequential.pl e2_h/l2_mode/set_bwprf  #this is  line 4 of the batch file

我收到的错误信息如下

代码语言:javascript
复制
Bareword found where operator expected at ./10BT_run1.Amset line 4, near "/tools       /test_driver_multi_aid_sequential"
    (Missing operator before test_driver_multi_aid_sequential?)
Bareword found where operator expected at ./10BT_run1.Amset line 4, near "/l2_mode/set_bwprf"
    (Missing operator before et_bwprf?)
EN

回答 2

Stack Overflow用户

发布于 2012-03-06 16:22:25

您正在以某种方式使用perl而不是cmd执行批处理文件(./10BT_run1.Amset)。

票数 2
EN

Stack Overflow用户

发布于 2012-03-06 16:13:05

您可以将perl文件作为perl解释器的参数运行

代码语言:javascript
复制
perl "../tools/test_driver_multi_aid_sequential.pl e2_h/l2_mode/set_bwprf" 

如果您打算在参数之间使用“将它们分隔为转义序列,如\”

它将避免您提到的错误

票数 -1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/9578599

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档