2012-03-06 48 views
0

我在批处理中执行我的perl文件。我在批处理文件中粘贴perl文件的所有名称并执行它。我正在给该文件的一个小演示。我在perl文件中得到Bareword错误

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

Perl ../tools/test_driver_multi_aid_sequential.pl e2_h/l2_mode/set_bwprf #this is line 4 of the batch file 

我越来越喜欢

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?) 
+0

尝试将整个输入放在双引号''“' – 2012-03-06 06:02:03

+0

或单引号中。单引号将帮助您忽略文件路径中的'/'。 – 2012-03-06 06:04:31

+0

在该行的开头添加单引号,即'Perl ../tools/test_driver_multi_aid_sequential.pl e2_h/l2_mode/set_bwprf'或只有参数? – Nitesh 2012-03-06 06:15:25

回答

-1

可以运行的Perl文件作为参数误差Perl解释器

perl "../tools/test_driver_multi_aid_sequential.pl e2_h/l2_mode/set_bwprf" 

如果你打算使用“在参数之间分开那些逃避序列,如 \”

这将避免你提到

2

你以某种方式使用执行的perl代替cmd批处理文件(./10BT_run1.Amset)错误。