kakarot has asked for the wisdom of the Perl Monks concerning the following question:
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Websites
by Petruchio (Vicar) on Dec 16, 2000 at 22:24 UTC | |
Web sites are made of HTML. You can use Perl to produce HTML, which is what you're seeing when you see a page whose name ends in .pl You're still going to be dealing with HTML, though. Programs which generate HTML in the way you're talking about are called CGI programs. You should learn to write CGI programs in Perl, using the CGI.pm module. There's plenty of tutorials and documentation out there. You'll need an account where you're allowed to run your own CGI programs. Good luck. | [reply] |
(Ovid) Re: Websites
by Ovid (Cardinal) on Dec 16, 2000 at 22:18 UTC | |
However, this is usually a bad idea if you want to create large, scalable sites. http://www.template-toolkit.org has a great discussion of why templates are typically the way to go. If the Template Toolkit is too daunting, try Using HTML::Template. It's a simpler solution and very easy to implement.
Cheers, Join the Perlmonks Setiathome Group or just click on the the link and check out our stats. | [reply] [d/l] |
Re: Websites
by Fastolfe (Vicar) on Dec 16, 2000 at 23:35 UTC | |
| [reply] |
Re: Websites
by Elgon (Curate) on Dec 17, 2000 at 03:09 UTC | |
I think that some bits of information you require have been given by more experienced people but here are my thoughts: 'Websites' are pretty much in HTML whether static or dynamically generated, only the source of the code changes. Perl is good for generating dynamic content and CGI.pm is a really useful module, although the HTML language it actually generates is crufty to read (bad formatting) - fortunately browsers don't mind ;-)
A final note and on something I know very little about: be aware of security and safety issues - it can be quite easy to overlook something which can really give your database a bad day if you're not careful! Hope this helped - enjoy. Elgon. "All characters are incidental" - Kurt Vonnegut Update: Check out this link for 'issues', many thanks to epoptai | [reply] |
Re: Websites
by lolindrath (Scribe) on Dec 17, 2000 at 04:22 UTC | |
--=Lolindrath=-- | [reply] |
by eg (Friar) on Dec 17, 2000 at 05:51 UTC | |
If you're using apache, you can just put the DirectoryIndex directive into your .htaccess file and not bother your poor, overworked sysadmin :) e.g., DirectoryIndex index.cgi index.pl index.scm index.html index.htm | [reply] |