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

Re: cgi development environment

Thread Previous | Thread Next
Chris Stinemetz
September 19, 2012 19:48
Re: cgi development environment
Message ID:
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;
  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,


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About