2012-03-06 54 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)錯誤。