Problems with CGI script

Here is the CGI script I am working on.  I have run it through the PERL Syntax checker and it gives me errors on the 'print <<"...";' statements, the 'exit;' statement, and the closing '}'.  I was wondering if you could tell me why?  Thanks!

#!/usr/bin/perl

require "subparseform.lib";
&Parse_Form;

$uid = $formdata{'uid'};
$pwd = $formdata{'pwd'};

use Win32::ODBC;

$db = new Win32::ODBC("DSN=CPCustomDB;UID=$uid;PWD=$pwd") || &Failed_Login;

######################
#start error routine for login
######################
Sub Failed_Login {

print "Content-type: text/html\n\n";
print <<"Failed Login";

<HTML>
<HEAD>
<TITLE>Failed Login</TITLE>
</HEAD>
<BODY BGCOLOR=#FFFFFF>
<TABLE BORDER=0 WIDTH=600 CELLSPACING=0 CELLPADDING=0>
      <TR>
            <TD ALIGN=CENTER VALIGN=TOP WIDTH=125 BGCOLOR=#4682B4> </TD>
            <TD ALIGN=CENTER VALIGN=TOP WIDTH=25 BGCOLOR=#FFFFFF> </TD>
            <TD ALIGN=LEFT VALIGN=TOP WIDTH=450 BGCOLOR=#FFFFFF> </TD>
      </TR>
</TABLE>
<TABLE BORDER=0 WIDTH=600 CELLSPACING=0 CELLPADDING=0>
      <TR>
            <TD ALIGN=CENTER VALIGN=TOP WIDTH=125 BGCOLOR=#4682B4> </TD>
            <TD ALIGN=CENTER VALIGN=TOP WIDTH=25 BGCOLOR=#FFFFFF> </TD>
            <TD ALIGN=LEFT VALIGN=TOP WIDTH=450 BGCOLOR=#FFFFFF>
                  <FONT FACE="Times" SIZE=+4 COLOR=TAN><CENTER><B>The Computer Place</B></CENTER></FONT>
                  <FONT SIZE=+1><CENTER>Intranet Database</CENTER></FONT><BR>
                  <P> 
                  <P><FONT FACE="Helvetica" COLOR="Red" SIZE="6"><CENTER><STRONG>ERROR!</STRONG></CENTER></FONT>
                  <P><FONT SIZE=3><STRONG>The server encoutered an error when trying to log you into the database using the username and password that you supplied.  Please check your username and password and try again.  Otherwise, please contact the database administrator.</STRONG></FONT>
                  <P><CENTER><FORM ACTION="http://domain.name/index.html"><INPUT TYPE="Submit" NAME="Go Back" VALUE="<<  Go Back"></FORM></CENTER>
            </TD>
      </TR>
</TABLE>
<TABLE BORDER=0 WIDTH=600 CELLSPACING=0 CELLPADDING=0>
      <TR>
            <TD ALIGN=CENTER VALIGN=TOP WIDTH=125 BGCOLOR=#4682B4> </TD>
            <TD ALIGN=CENTER VALIGN=TOP WIDTH=25 BGCOLOR=#FFFFFF> </TD>
            <TD ALIGN=LEFT VALIGN=BOTTOM WIDTH=450 BGCOLOR=#FFFFFF><FONT COLOR="tan"><STRONG> </STRONG></FONT></TD>
      </TR>
</TABLE>
</BODY>
</HTML>

Failed Login
exit;
}
######################
#end error routine for login
######################

##################
#start normal display
##################
print "Content-type: text/html\n\n";

print<<"Form Layout";

<HTML>
<HEAD>
<TITLE>Table Selection</TITLE>
</HEAD>
<BODY BGCOLOR=#FFFFFF>
<TABLE BORDER=0 WIDTH=600 CELLSPACING=0 CELLPADDING=0>
      <TR>
            <TD ALIGN=CENTER VALIGN=TOP WIDTH=125 BGCOLOR=#4682B4> </TD>
            <TD ALIGN=CENTER VALIGN=TOP WIDTH=25 BGCOLOR=FFFFFF> </TD>
            <TD ALIGN=LEFT VALIGN=TOP WIDTH=450 BGCOLOR=FFFFFF> </TD>
      </TR>
</TABLE>
<TABLE BORDER=0 WIDTH=600 CELLSPACING=0 CELLPADDING=0>
      <TR>
            <TD ALIGN=CENTER VALIGN=TOP WIDTH=125 BGCOLOR=#4682B4> </TD>
            <TD ALIGN=CENTER VALIGN=TOP WIDTH=25 BGCOLOR=FFFFFF> </TD>
            <TD ALIGN=LEFT VALIGN=TOP WIDTH=450 BGCOLOR=FFFFFF>
                  <FONT FACE="Times" SIZE=+4 COLOR=TAN><CENTER><B>The Computer Place</B></CENTER></FONT>
                  <FONT SIZE=+1><CENTER>Intranet Database</CENTER></FONT><BR>
                  <P> 
                  <P>Please select the table you wish to view from the list below.
                  <P><FORM ACTION=http://domain.name/cgi-bin/tableselection.cgi METHOD=POST ID=tableredirect>

Form Layout

                        print "<INPUT TYPE=\"Hidden\" NAME=\"uid\" VALUE=$uid>";
                        print "<INPUT TYPE=\"Hidden\" NAME=\"pwd\" VALUE=$pwd>";

print<<"Form Layout";

                        <INPUT TYPE=\"Radio\" NAME=\"table\" ID=\"customers\">Customer Table<BR>
                        <INPUT TYPE=\"Radio\" NAME=\"table\" ID=\"inventory\">Inventory List<BR>
                        <P><CENTER><INPUT TYPE=\"Submit\" NAME=\"Submit\" VALUE=\"Continue\"></CENTER>
            </TD>
      </TR>
</TABLE>
<TABLE BORDER=0 WIDTH=600 CELLSPACING=0 CELLPADDING=0>
      <TR>
            <TD ALIGN=CENTER VALIGN=TOP WIDTH=125 BGCOLOR=#4682B4> </TD>
            <TD ALIGN=CENTER VALIGN=TOP WIDTH=25 BGCOLOR=FFFFFF> </TD>
            <TD ALIGN=LEFT VALIGN=BOTTOM WIDTH=450 BGCOLOR=FFFFFF><FONT COLOR=\"tan\"><STRONG><P> <P> <P> <P> </STRONG></FONT></TD>
      </TR>
</TABLE>
</BODY>
</HTML>

Form Layout
#################
#end normal display
#################
GimpsterAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

GimpsterAuthor Commented:
Edited text of question.
0
GimpsterAuthor Commented:
Adjusted points to 110
0
ozoCommented:
What was the error message?  Was it
syntax error at - line 20, near "print"
Can't find string terminator "Failed Login" anywhere before EOF at - line 20 (#1)
   
    (F) Perl strings can stretch over multiple lines.  This message means that
    the closing delimiter was omitted.  Because bracketed quotes count nesting
    levels, the following is missing its final parenthesis:
   
        print q(The character '(' starts a side comment.);
   
    If you're getting this error from a here-document, you may have
    included unseen whitespace before or after your closing tag. A good
    programmer's editor will have a way to help you find these characters.
   
Uncaught exception from user code:
        Can't find string terminator "Failed Login" anywhere before EOF at - line 20.

Or was it because you misspelled sub as Sub?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Scripting Languages

From novice to tech pro — start learning today.