Re: cgi development environment
Also check out http://search.cpan.org/~lds/CGI.pm-3.08/CGI/Carp.pm -- Shaun Fryer -- perl -e 'print chr for map{$_+=22}($ARGV[0])=~/(\d\d)/g' \ 52959394107588899482799210587992861082757785799222 -- On Wed, Sep 19, 2012 at 11:54 PM, Chris Stinemetz wrote: >>> >> You have a couple other issues. Since you have one print statement, spread >> over multiple lines, the semi-colons on lines 10 and 11 are bugs. They >> should be commas. The semi-colons terminate the statement resulting in >> syntax errors. >> >> Mike > > Thank you. That fixed it. > > -Chris > > -- > To unsubscribe, e-mail: beginners-cgi-unsubscr...@perl.org > For additional commands, e-mail: beginners-cgi-h...@perl.org > http://learn.perl.org/ > > -- To unsubscribe, e-mail: beginners-cgi-unsubscr...@perl.org For additional commands, e-mail: beginners-cgi-h...@perl.org http://learn.perl.org/
Re: cgi development environment
>> > You have a couple other issues. Since you have one print statement, spread > over multiple lines, the semi-colons on lines 10 and 11 are bugs. They > should be commas. The semi-colons terminate the statement resulting in > syntax errors. > > Mike Thank you. That fixed it. -Chris -- To unsubscribe, e-mail: beginners-cgi-unsubscr...@perl.org For additional commands, e-mail: beginners-cgi-h...@perl.org http://learn.perl.org/
Re: cgi development environment
On Wed, Sep 19, 2012 at 10:48 PM, Chris Stinemetz wrote: > 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 > The error message is a major clue. Try quotes around "left" > /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 > > You have a couple other issues. Since you have one print statement, spread over multiple lines, the semi-colons on lines 10 and 11 are bugs. They should be commas. The semi-colons terminate the statement resulting in syntax errors. Mike
Re: cgi development environment
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 -- To unsubscribe, e-mail: beginners-cgi-unsubscr...@perl.org For additional commands, e-mail: beginners-cgi-h...@perl.org http://learn.perl.org/
Re: cgi development environment
On 18 Sep 2012, at 13:34, Chris Stinemetz wrote: > I am very interested in cgi scripting. I have only used php for web > development in the past. CGI or Perl? For a long time CGI with Perl was a popular combination so there are a lot of documents which conflate the two. It is possible to do CGI programming in PHP (which you already know), but PSGI[1] is the flavour du jour for server side web programming with Perl. CGI is still a plausible option though. It has the benefit of simplicity (but isn't the most efficient option). [1] http://plackperl.org/ -- David Dorward http://dorward.me.uk -- To unsubscribe, e-mail: beginners-cgi-unsubscr...@perl.org For additional commands, e-mail: beginners-cgi-h...@perl.org http://learn.perl.org/
Re: cgi development environment
These are some materials I use: http://cpan.uwinnipeg.ca/htdocs/CGI.pm/CGI.html http://www.cookwood.com/perl/examples/overview.html I'm not sure those are the best sources for getting up and running. If not, I can help you with that too. First thing I would do is install Perl. Either ActiveState, or Strawberry Perl. I use ActiveState. I think CGI comes automatically, but if not install that too with 'ppm'. Get back to me if you need help with that. Mike On 9/18/2012 8:34 AM, beginners-cgi-digest-h...@perl.org wrote: Subject: cgi development environment From: Chris Stinemetz Date: 9/18/2012 8:34 AM To: Hello list, I am very interested in cgi scripting. I have only used php for web development in the past. Would someone please let me know of any good tutorials to get windows based web development environment set up and get my feet wet? Thank you in advance, Chris