Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re: newbie and perl/web development

by Cody Pendant (Prior)
on Jan 19, 2009 at 00:30 UTC ( #737194=note: print w/ replies, xml ) Need Help??

in reply to newbie and perl/web development

My copy of "Learning Perl" has stuff about CGI, in chapter 19. It's an old edition, but still.

Here's a really quick lesson on how to do web pages with Perl:

  1. First, understand HTML
  2. Write a perl script which outputs HTML
  3. Put print "Content-type: text/html\n\n"; before any other output.
  4. Put it on a web server
  5. chmod it so it's executable
  6. Go to its URL

I'm being a bit facetious, but clearly that point 1. there is something of a big issue.

What you should do, as soon as you've got the absolute basics, like the above, out of the way, is to learn a templating module. I'd recommend HTML::Template, which has never let me down. I've wondered if I might outgrow it and need to use another module, but every time I've wanted to do something, it's been there in the documentation. And of course you'll need to understand the basics of as well.

The normal progression of someone doing web pages with perl is "lots of crappy print statements; lots of crappy HEREDOCs; use of a templating module." -- do yourself a favour and skip/spend as little time as possible on, those first two.

Nobody says perl looks like line-noise any more
kids today don't know what line-noise IS ...

Comment on Re: newbie and perl/web development
Select or Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2015-10-09 06:47 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (234 votes), past polls