Nitesh
Nitesh

Reputation: 157

I am getting Bareword error in perl file

I am executing my perl files in a batch. I am pasting all the name of the perl file in a batch file and executing it. I am giving a small demo of the file.

The batch file /10BT_run1.Amset contains:

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

I am getting error like

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

Upvotes: 0

Views: 269

Answers (2)

ikegami
ikegami

Reputation: 385887

You are somehow executing the batch file (./10BT_run1.Amset) using perl instead of cmd.

Upvotes: 2

Madhan
Madhan

Reputation: 1321

you can run the perl files as argument to perl interpreter

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

if you are going to use " in between the arguments separate those as escaping sequence like \"

It will avoid the error that you have mentioned

Upvotes: -1

Related Questions