A few comments to keep you on your toes:
I would also look at fun stuff early on - eg, grab a web page and parse some information from it:if ('four' gt 'five'){ print "four is greater than five\n"; }
Just a personal preference, but I prefer to use CGI in OO way, because for me the code is easier to read, eg:#!/usr/bin/perl -w use strict; use LWP::Simple; my $page = get('http://www.google.com'); # regex to extract certain text etc...
#!/usr/bin/perl -w use strict; use CGI; my $q = new CGI; print $q->header, $q->start_html, $q->table( $q->Tr( $q->th( 'This is a table header', ), $q->td( 'This is a table cell', ), ), ), $q->end_html; exit(0);
For me, $q is short for $query (but I don't just use it for forms these days...)
That way, you can 'hide' the details of namespaces and exporting a little longer. Or at least avoid issues when they use two modules that export subs with the same names to the main script (ack, I'm getting ham-handed in explaining this, sorry).
I see you have the SAMS book, but I'd suggest you also read "Learning Perl" (the 'Llama').
Something I don't see is an explanation of the line:
#!/usr/bin/perl
but perhaps I missed it...
Oh, and on the subject of first line, I think the -w is ignored under windows (someone, please correct me if I'm wrong here) and you should use "use warnings;" instead.
That's all for now. Perhaps when you have more up, you could ask the monastery to take a look - after all, the last thing we want is for a bunch of little brats coming here to come here and ask us questions when you get paid to do it* ;-)
good luck
cLive ;-)
* - err, that's meant to be humorous - sometimes I have to be explicit because people miss the wink...
--
seek(JOB,$$LA,0);
In reply to Re: Perl High School
by cLive ;-)
in thread Perl High School
by hsweet
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |