develooper Front page | perl.beginners.cgi | Postings from September 2012

Re: cgi development environment

Thread Previous | Thread Next
From:
Chris Stinemetz
Date:
September 19, 2012 19:48
Subject:
Re: cgi development environment
Message ID:
CA+HbpzihQiJiQhXQDU5PHF6z2w9cxX=ZnuKP7q1-ROaB0DHJVQ@mail.gmail.com
I have my Perl cgi development environment all set-up. I actually
wound up setting up an instance through Amazon AWS.
Very cool service by Amazon.

I am having issues with my first script and have hopes someone may be
able to explain to me whey it isn't working correctly.

The error is coming form line 11 and the error is:

Premature end of script headers: test2.cgi
Bareword "left" not allowed while "strict subs" in use at
/usr/lib/cgi-bin/test2.cgi line 7.
Execution of /usr/lib/cgi-bin/test2.cgi aborted due to compilation errors.
Premature end of script headers: test2.cgi


  1 #!/usr/bin/perl
  2 use warnings;
  3 use strict;
  4 use CGI;
  5
  6 my $q = CGI->new;
  7 print $q->header(-type=>'text/html'),
  8       $q->start_html('hello world'), # start the HTML
  9       $q->h1({-align=>right},'hello world'),         # level 1 header
 10       $q->h1({-align=>left});
 11       $q->h1('some','contents');
 12       $q->end_html;                  # end the HTML

Thank you in advance,

-Chris

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About