Page 1 of 1

"Bareword found where operator expected" type of Perl Error

Posted: Mon Jul 21, 2014 10:49 am
by JeffVI
I got the following perl error when I tried to rebuild my ADL, and couldn't get around it. Any help is sincerely appreciated!

Code: Select all

Building src in ./SCIENCE...
make[2]: Entering directory `/data/data132/ADL4.2/ADL/xml/SCIENCE'
/data/data132/ADL4.2/ADL/perl/src/generateSourceFiles.pl /data/data132/ADL4.2/ADL/xml/SCIENCE ADL -h /data/data132/ADL4.2/ADL/include -o /data/data132/ADL4.2/ADL/CMN/Utilities/Dictionary/Entries/SCIENCE/src -e AutoDerivedScienceDictionaryEntries -g AutoGeneratedScienceProductsGbl.h -d /data/data132/ADL4.2/ADL/CMN/ProcessingIO/src -f AutoGeneratedScienceProductsGbl.f
 --> Processing /data/data132/ADL4.2/ADL/xml/SCIENCE/EDR_TEMPLATE1_OUTPUT1_EDR.xml
Unknown "re" subpragma '/aa' (known ones are: 'debug', 'debugcolor', 'eval', 'taint') at /data/data020/JPSS_AIT/ADL_Versions/CSPP/common/COTS/perl/perls/perl-5.19.2/lib/5.19.2/utf8_heavy.pl line 4.
Bareword found where operator expected at /data/data020/JPSS_AIT/ADL_Versions/CSPP/common/COTS/perl/perls/perl-5.19.2/lib/5.19.2/utf8_heavy.pl line 23, near "s/[-\s_]//rg"
syntax error at /data/data020/JPSS_AIT/ADL_Versions/CSPP/common/COTS/perl/perls/perl-5.19.2/lib/5.19.2/utf8_heavy.pl line 23, near "s/[-\s_]//rg"
BEGIN not safe after errors--compilation aborted at /data/data020/JPSS_AIT/ADL_Versions/CSPP/common/COTS/perl/perls/perl-5.19.2/lib/5.19.2/utf8_heavy.pl line 149.
Compilation failed in require at /data/data020/JPSS_AIT/ADL_Versions/CSPP/common/COTS/perl/perls/perl-5.19.2/lib/5.19.2/utf8.pm line 16.

Re: "Bareword found where operator expected" type of Perl Er

Posted: Tue Jul 22, 2014 8:23 am
by tsimpson
The messages seem to show the error is happening in utf8_heavy.pl, which is supplied with Perl. The version of utf8_heavy.pl we have on our ADL Linux boxes (Perl 5.8.8) does not look like what you seem to have based on the messages. Is there a way for you to use a different version of Perl?

Re: "Bareword found where operator expected" type of Perl Er

Posted: Tue Jul 22, 2014 8:27 am
by scottm
Had you built ADL successfully previously?
Are you using a system Perl or the COTS perl?

Re: "Bareword found where operator expected" type of Perl Er

Posted: Tue Jul 22, 2014 7:03 pm
by JeffVI
I am using a COTS perl. I can give a try on system perl. Thanks a lot for the hints!

Re: "Bareword found where operator expected" type of Perl Er

Posted: Tue Jul 22, 2014 9:34 pm
by JeffVI
I am happy to report back that the ADL4.2 was built successfully after I switched the COTS Perl to the system Perl. Thanks a lot for all the kind hints! :)

Re: "Bareword found where operator expected" type of Perl Er

Posted: Wed Jul 23, 2014 6:37 am
by houchin
JeffVI wrote:I am happy to report back that the ADL4.2 was built successfully after I switched the COTS Perl to the system Perl. Thanks a lot for all the kind hints! :)
I have had a problem similar to this in the past, although I don't remember the specific error. I see no reason to make a complete reinstall of perl just for ADL. On the systems on which I've compiled ADL, all of the required Perl modules have come with the standard distribution.

Re: "Bareword found where operator expected" type of Perl Er

Posted: Wed Jul 23, 2014 9:05 am
by JeffVI
I think the issue is quite machine dependent. The reason is, I have the same ADL installed on another linux box with COTS perl, but somehow the same COTS perl did not work compatibly with this linux machine. Some environmental settings on the machine was playing tricks on me I think. :(