Gossamer Forum
Home : Products : DBMan : Installation :

cant use global@_ ?

Quote Reply
cant use global@_ ?
I got this error message and don't know what it means. What did I do wrong?

CGI ERROR
==========================================
Error Message : Error loading required libraries.
Check that they exist, permissions are set correctly and that they compile.
Reason: Can't use global @_ in "my" at ./treehtml.pl line 60.

Script Location : db.cgi
Perl Version : 5.00502
Setup File : tree.cfg
Quote Reply
Re: cant use global@_ ? In reply to
Possibly you have an email address on line 60 of treehtml.pl. If so, you need to put a \ before the @ in the email address.

If that's not the issue, please post your line 60 and I'll see what I can figure out.


------------------
JPD





Quote Reply
Re: cant use global@_ ? In reply to
the only thing in the mentioned line is
my (%rec) = @_;

here are lines 60-93:

my (%rec) = @_;
($db_auto_generate and print &build_html_record_form(%rec) and return);

my $font = 'Font face="Verdana, Arial, Helvetica" Size=2 Color=#003399';

print qq|
<TABLE WIDTH="450" CELLPADDING=0 CELLSPACING=0 BORDER=0 BGCOLOR="#dad3b4">
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="150"><$font_color>ID:</FONT></TD>
<TD VALIGN="TOP" WIDTH="475"> <INPUT TYPE="TEXT" NAME="ID" VALUE="$rec{'ID'}" SIZE="3" MAXLENGTH="5"></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP"><$font_color>Common Name:</FONT></TD>
<TD VALIGN="TOP"> <INPUT TYPE="TEXT" NAME="Common Name" VALUE="$rec{'Common Name'}" SIZE="40" MAXLENGTH="255"></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP"><$font_color>Genus: </FONT></TD>
<TD VALIGN="TOP"> <INPUT TYPE="TEXT" NAME="Genus" VALUE="$rec{'Genus'}" SIZE="40" MAXLENGTH="255"></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP"><$font_color>Species: </FONT></TD>
<TD VALIGN="TOP"> <INPUT TYPE="TEXT" NAME="Species" VALUE="$rec{'Species'}" SIZE="40" MAXLENGTH="20"></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP"><$font_color>Other Names:</FONT></TD>
<TD VALIGN="TOP"> <INPUT TYPE="TEXT" NAME="Other Names" VALUE="$rec{'Other Names'}" SIZE="40" MAXLENGTH="255"></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP"><$font_color>Position:</FONT></TD>
<TD VALIGN="TOP"> <TEXTAREA NAME="Position" ROWS="4" COLS="40" WRAP="VIRTUAL" MAXLENGTH="255">$rec{'Position'}</TEXTAREA></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP"><$font_color>Watering:</FONT></TD>
<TD VALIGN="TOP"> <TEXTAREA NAME="Watering" ROWS="4" COLS="40" WRAP="VIRTUAL" MAXLENGTH="255">$rec{'Watering'}</TEXTAREA></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP"><$font_color>Feeding:</FONT></TD>
<TD VALIGN="TOP"> <TEXTAREA NAME="Feeding" ROWS="4" COLS="40" WRAP="VIRTUAL" MAXLENGTH="255">$rec{'Feeding'}</TEXTAREA></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP"><$font_color>Repotting:</FONT></TD>
<TD VALIGN="TOP"> <TEXTAREA NAME="Repotting" ROWS="4" COLS="40" WRAP="VIRTUAL" MAXLENGTH="255">$rec{'Repotting'}</TEXTAREA></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP"><$font_color>Pruning:</FONT></TD>
<TD VALIGN="TOP"> <TEXTAREA NAME="Pruning" ROWS="4" COLS="40" WRAP="VIRTUAL" MAXLENGTH="255">$rec{'Pruning'}</TEXTAREA></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP"><$font_color>Propagation:</FONT></TD>
<TD VALIGN="TOP"> <TEXTAREA NAME="Propagation" ROWS="4" COLS="40" WRAP="VIRTUAL" MAXLENGTH="255">$rec{'Propagation'}</TEXTAREA></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP"><$font_color>Suggestions:</FONT></TD>
<TD VALIGN="TOP"> <TEXTAREA NAME="Suggestions" ROWS="4" COLS="40" WRAP="VIRTUAL" MAXLENGTH="255">$rec{'Suggestions'}</TEXTAREA></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP"><$font_color>Photo: </FONT></TD>
<TD VALIGN="TOP"> <INPUT TYPE="TEXT" NAME="Photo" VALUE="$rec{'Photo'}" SIZE="20" MAXLENGTH="255"></TD></TR>
</TABLE>
Quote Reply
Re: cant use global@_ ? In reply to
Then the problem is before line 60. My second guess (since the first one was wrong Smile is that you either have an extra quotation mark or are missing a quotation mark where there should be one somewhere before line 60.

When you get an error, start at the line given and work your way up. Often the error is on a line before the one in the error message.


------------------
JPD





Quote Reply
Re: cant use global@_ ? In reply to
You were right!
I had placed an extra quotation mark at
$ html_title (the title itself had a quotation mark). The problem was solved when I deleted the mark.

Thanks a million!
Quote Reply
Re: cant use global@_ ? In reply to
You're very welcome. I should have thought of it before, since this did come up one other time.

If you want to use an apostrophe in your html_title, you can surround the titles with double quotes instead of single quotes:

$html_title = "Gail's Database";

will work.


------------------
JPD