Jump to content

Perl/CGI Tutorials

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
3 replies to this topic

#1
jthom263

jthom263

    Learning Programmer

  • Members
  • PipPipPip
  • 74 posts
Hello I Was wondering if anyone would be kind enough to write me some perl tutorials for a new website i am currently Developing. They Cannot Be Plagurised.

Any Help Would Be Dearly Appreciated. :):lol:
Thanks. Jack
:)

#2
hodge-podge

hodge-podge

    Learning Programmer

  • Members
  • PipPipPip
  • 47 posts
Well what kind of tutorials you looking for?

#3
jthom263

jthom263

    Learning Programmer

  • Members
  • PipPipPip
  • 74 posts
Basically Anything That Might Be Helpful and interesting and anything from beginner to advanced. :) Thanks For The Reply :lol:
:)

#4
bythos

bythos

    Newbie

  • Members
  • PipPip
  • 14 posts
Here is an example


#!/usr/bin/env perl

use strict;

use warnings;

use CGI qw(:cgi); #import only what we need no html generation needed


my $q = CGI->new; #create a new CGI object

my $name = $q->param('name') || "No name suppiled"; #looks for env.pl?name=


print $q->header; #print contenttype header Content-Type: text/html


print <<HTML;

<!DOCTYPE html>

<html>

<head>

        <title>ENV Example</title>

</head>

<body>

<h1>$name</h1>

HTML


foreach my $key (keys %ENV){

        print "$key = $ENV{$key}<br/>\n";

}


print <<HTML;

</body>

</html>

HTML