Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

bareword found where operator expected

Tags:

perl

I am new to perl, and I am fiddiling around. I found this code online. Here is the snippet of code:

82 process_input(q,[]).
83 process_input(n,Task) :- toptask(Task), set_new_threshold.
84 process_input(s,Task) :- suggest_task(T),
85         apply(addtoagenda,T),toptask(Task).
86 process_input(x,Task) :- print('not yet implemented'),nl,toptask(Task).
87 process_input(i,Task) :- user_task,toptask(Task).

And I am getting this error: Bareword found where operator expected near "process_input(n, Task" line 83. Might be a runaway multi-line ,, string starting on line 82.

like image 729
Alan Williams Avatar asked Jan 28 '11 21:01

Alan Williams


1 Answers

A 'Bareword' error is caused by a syntax error in your code. A 'runaway multi-line' usually pinpoints where the start of the error is, and usually means that a line has not been completed, often because of mismatched brackets or quote marks.

As has been pointed out by several SO-ers, that doesn't look like Perl! The Perl interpreter is balking on a syntax error because it doesn't speak that particular language!

like image 150
Purpletoucan Avatar answered Sep 20 '22 18:09

Purpletoucan