Gossamer Forum
Home : Products : DBMan : Customization :

scalar errors

Quote Reply
scalar errors
I have run into a problem receiving a "scalar found where operator expected at ./bunkerhtml.pl line 425, at end of line" error.

This bit of code is found in the html_add_success section. It works fine on the email to user. (see code below):

%rec = &get_record($in{$db_key});
# send mail to user
open (MAIL, "$mailprog") or &cgierr("unable to open mail program");
print MAIL "To: $rec{'Email'}\n";
print MAIL "From: LHOS Support Request System\n";
print MAIL "Subject: New Record Added to Bunker Help Desk Request System\n";
print MAIL "This is an automated message. Please do not attempt to reply.\n\n";
print MAIL "A ticket has been submitted with the following information.\n\n";
print MAIL "You should receive a second email confirming that your request\n";
print MAIL "has been entered into the IOM Request System.\n\n";
print MAIL "If you do not receive this confirmation within one hour, contact\n";
print MAIL "LHOS at (901) 263-2830. Please refer to the above Ticket # when\n";
print MAIL "you call.\n\n";
print MAIL "-" x 75 . "\n\n";
foreach $column(@db_cols) {
print MAIL "$column: $rec{$column}\n\n";
}
close MAIL;


I think the problem seems to be in the send email to admin section (see code below):

# send mail to admin
open (MAIL, "$mailprog") or &cgierr("unable to open mail program");
#print MAIL "To: $admin_email\n";
print MAIL "From: LHOS Support Request System\n";
print MAIL "Subject: New Record Added to Bunker Help Desk Request System\n";
print MAIL "-" x 75 . "\n\n";
foreach $column(@db_cols) {
print MAIL "$column: $rec{$column}\n\n";
}
close MAIL;


Does anyone have an idea on what is causing this error? I've looked high and low but have not found anything wrong..

Thanks!
Quote Reply
Re: [dawg821] scalar errors In reply to
It'd really help to know what was on line 425. Try downloading a text editor that shows line numbers (such as Textpad - it's free).

A scalar is a string or number so I'd say you've got something mistyped such as "r" instead of "or" since it is expecting an operator.

Could it be this line?
print MAIL "-" x 75 . "\n\n";
Quote Reply
Re: [Watts] scalar errors In reply to
I'd also check this line:

print MAIL "LHOS at (901) 263-2830. Please refer to the above Ticket # when\n";

Try changing ticket # to No. as the pound sign could be causing it to ignore the rest of the line as a comment?

Unoffical DBMan FAQ
http://redundantcartridge.com/dbman/