atnonis has asked for the wisdom of the Perl Monks concerning the following question:

Hi everyone.
I have the folowing sub
sub display_error { my $html_title = $_[0]; my $error = $_[1]; print $cgi->start_html(-title=>"Error: $html_title"). $cgi->h3($error). $cgi-end_html(); }

and this one:
display_error("User already exists","Sorry, user $add_user already exi +sts, founded line $found.");

when this is requested i get the following error:
Software error: Undefined subroutine &main::end_html called at C:/Program Files/Apache + Group/Apache2/htdocs/login.pl line 231.

i can't figure out what the problem is.

Antonis

Replies are listed 'Best First'.
Re: sub routine - cgi Undefined subroutine
by Wonko the sane (Curate) on Mar 10, 2003 at 21:32 UTC
    Your missing the '>' sign in your end_html() call.
    $cgi->end_html();
    Wonko :-)
Re: sub routine - cgi Undefined subroutine
by Cabrion (Friar) on Mar 11, 2003 at 00:06 UTC
    $cgi->end_html()

    Note the ">" above which you just missed.