Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^2: Starting with Perl

by bradcathey (Prior)
on Jul 26, 2005 at 11:24 UTC ( #478139=note: print w/replies, xml ) Need Help??


in reply to Re: Starting with Perl
in thread Starting with Perl

Interesting point and it might be good to know how to include HTML within your Perl, but know there are 3 ways to do that:

  1. print statements (messy for a big HTML page)
  2. here docs
  3. CGI (lots of little 'codes' to learn)

However, if you are going to be doing any extensive web stuff, don't discount the templating route too quickly. I use HTML::Template exclusively and love it. It's really *not* like learning a whole new language (coding conventions aren't that extensive and are pretty easy to learn—feels like HTML), and most importantly, you keep HTML and Perl (or any executable server side coding separate. This is expecially important if you are working with non-programming web page designers (like I do every day).

In any case you will want to add CGI to your ammo belt. Take a look at a short course by the Monastery's very own Ovid.


—Brad
"The important work of moving the world forward does not wait to be done by perfect men." George Eliot

Replies are listed 'Best First'.
Re^3: Starting with Perl
by techcode (Hermit) on Jul 26, 2005 at 14:41 UTC
    I would also recommend HTML::Template. To add a bit more check out some framework for CGI applications. Such as CGI::Application.

    HTML::Template + CGI::Application work well together - and there are many resources about both (CGI::App even has it's own Wiki with tutorials, articles FAQ ...etc)

    It wont get you too far away from "dirty Perl" - but it's a much better and cleaner approach. Not to mention it's much faster way to write code ... Actually I'm running whole web sites on it - and even under plain CGI it works reasonably well.

    Template toolkit might be another good option - but somehow I got the same feeling - it's simply not it. It's not Perl, it's not HTML. Maybe I'm wrong (probably I am since many people say it's good) as I still haven't had time to read book about it ...

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://478139]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2021-06-20 07:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What does the "s" stand for in "perls"? (Whence perls)












    Results (94 votes). Check out past polls.

    Notices?