Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Compilation errors.
tienle66
I'm getting a compilation errors on my sendWFMail.pl. It's working fine on my production box (TS 5.5.2/Solaris) but failing on my development box (TS 6.5/Solaris).
Can it be the Perl version? Any ideas why? Here's a snippet of my error msg:
Jul 8 11:04:35 vertebrae [8773]: [ID 702911 local3.info] Operator or semicolon missing before   at /www/NLMadm/sendWfMail.pl li
ne 58.
Jul 8 11:04:35 vertebrae [8773]: [ID 702911 local3.info] Ambiguous use of & resolved as operator & at /www/NLMadm/sendWfMail.pl lin
e 58.
Jul 8 11:04:35 vertebrae [8773]: [ID 702911 local3.info] Scalar found where operator expected at /www/NLMadm/sendWfMail.pl line 59,
near "my $Nbsp8 = "${Nbsp4}"
Jul 8 11:04:35 vertebrae [8773]: [ID 702911 local3.info] (Might be a runaway multi-line "" string starting on line 58)
Jul 8 11:04:35 vertebrae [8773]: [ID 702911 local3.info] (Do you need to predeclare my?)
Jul 8 11:04:35 vertebrae [8773]: [ID 702911 local3.info] syntax error at /www/NLMadm/sendWfMail.pl line 59, near "my $Nbsp8 = "${Nb
sp4}"
Jul 8 11:04:35 vertebrae [8773]: [ID 702911 local3.info] Scalar found where operator expected at /www/NLMadm/sendWfMail.pl line 59,
near "${Nbsp4}${Nbsp4}"
Jul 8 11:04:35 vertebrae [8773]: [ID 702911 local3.info] (Missing operator before ${Nbsp4}?)
Jul 8 11:04:35 vertebrae [8773]: [ID 702911 local3.info] String found where operator expected at /www/NLMadm/sendWfMail.pl line 61,
near "my $IWBIN = ""
Jul 8 11:04:35 vertebrae [8773]: [ID 702911 local3.info] (Might be a runaway multi-line "" string starting on line 59)
Jul 8 11:04:35 vertebrae [8773]: [ID 702911 local3.info] (Missing semicolon on previous line?)
Jul 8 11:04:35 vertebrae [8773]: [ID 702911 local3.info] Scalar found where operator expected at /www/NLMadm/sendWfMail.pl line 61,
near "my $IWBIN = "${IWHOME}"
Jul 8 11:04:35 vertebrae [8773]: [ID 702911 local3.info] (Do you need to predeclare my?)
Jul 8 11:04:35 vertebrae [8773]: [ID 702911 local3.info] String found where operator expected at /www/NLMadm/sendWfMail.pl line 61,
near "${IWHOME}" . ""
Jul 8 11:04:35 vertebrae [8773]: [ID 702911 local3.info] (Missing operator before " . "?)
Jul 8 11:04:35 vertebrae [8773]: [ID 702911 local3.info] String found where operator expected at /www/NLMadm/sendWfMail.pl line 62,
near "my $IWATTRIB = ""
Thanks.
Find more posts tagged with
Comments
Migrateduser
It looks like it was mangled somewhat. No version of Perl likes an operator or semicolon missing before  . I'd recommend just debugging the script. The error messages are descriptive enough.
Current Environments:
(1) TS 6.5 on W2K3 (x2 - diff. imp.)
(3) Vignette V7 Portal on Solaris 9
tienle66
Yeah, I was planning to go thru line by line and correct the error but figured I throw it out to the forum.
Looking at the script, it doesn't look like it's missing the operator, etc.
Line 58 begins:
my $Nbsp4 = " ";
my $Nbsp8 = "${Nbsp4}${Nbsp4}";
my $IWHOME = NLM::Utils::getTeamSiteHome;
my $IWBIN = "${IWHOME}" . "/bin";
my $IWATTRIB = "${IWBIN}" . "/iwattrib";
my $EmailMap = "${IWHOME}" . "/conf/roles/email_map.cfg";
my $Admin = "websupport";
my $MailFooter = "<p>"
. " If you have any questions, contact "
. "<a href=mailto:wwwnlm\
@nlm
.nih.gov>wwwnlm\
@nlm
.nih.gov</a>\n"
. "<br> Web Management Team, Public Services Division</p>";
Edited by NIH on 07/08/05 08:57 AM (server time).
Migrateduser
This might be a mistake via cut and paste, but your last line is missing a semicolon. Also, if you've worked with Perl a bit, you know that the interpreter's complaining about line 58 does not necessarily indicate that line 58 is where the first problem is. In other words, there might be a string that's not quoted properly or a statement that's not closed properly, etc.
If you're testing this on command line, I'd recommend put various "die" statements in there to see where exactly (and how) the code is bombing.
Dave
Current Environments:
(1) TS 6.5 on W2K3 (x2 - diff. imp.)
(3) Vignette V7 Portal on Solaris 9
tienle66
Thanks Dave.
I'll try your suggestion. I'm just confused why it compiles on TS 5.5.2 environment and not on TS 6.5.
Migrateduser
I assume your 5.5.2 and 6.5 instances are not on the same machine? If the 6.5 script is part of the 6.5 fresh install, then maybe the script is buggy (although, not likely). Otherwise, if the 6.5 script is left over from an upgrade, or perhaps the 5.5.2 version was left there during the upgrade(s), maybe it got opened, a character was removed, and saved accidentally? Just a hunch, but this is not the important issue and I'm going on very limited information.
I'm also working with 6.5 (no SP), so I'd be curious if you were to
attach
your script, I'd do a diff between that and mine.
Dave
Current Environments:
(1) TS 6.5 on W2K3 (x2 - diff. imp.)
(3) Vignette V7 Portal on Solaris 9
Adam Stoller
The problem could start before line 58 but it might take until line 58 before it was noticed. a likely possibility is that you have a double-quote somewhere above that is missing it's end-double-quote and thus line 58 might be seen as:
".......
my $Nbsp4 = "
";
...
Why it would have compiled with Perl 5.00503 is curious - but I'd worry less about that than finding out what the actual problem in the code is now.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
tienle66
Thanks Dave and fish.
It was missing the double quote a few lines up.