Home : General : Perl Programming :

General: Perl Programming: Re: [RedRum] How to use ?: Edit Log

Here is the list of edits for this post
Re: [RedRum] How to use ?
Still getting errors!!!
I'm confused....

#!/usr/bin/perl
if ($ENV{QUERY_STRING} eq 'aboutme') {
&aboutme;
}
elsif ($ENV{QUERY_STRING} eq 'pictures') {
&pictures;
}
elsif ($ENV{QUERY_STRING} eq 'guestbook') {
&guestbook;
}
else {
&main;
}
sub main {
print qq~
Welcome to my page! <br>
Here is what you can find in my page:<br>
<A HREF=page.cgi?aboutme>About me</A> - <A HREF=page.cgi?pictures>Pictures</A><br>
<A HREF=page.cgi?guestbook>Guestbook</A>
~;
}
sub aboutme {
&aboutmehtml;
}

sub aboutmehtml {
print qq~
Welcome to the page about me!<br>
Here you'll find lots of information about me!<br>
Isen't that great?<br>
My name is xxx<br>
I live in a small town in Norway.
~;
}
sub pictures {
&pictureshtml;
}

sub pictureshtml {
print qq~
Here are som pictures!
~;
}
sub guestbook {
&guestbookhtml;
}

sub guestbookhtml {
print qq~
Say what you think about this page!
Fill out the form:
~;
}

Last edited by:

Andy: Mar 29, 2011, 6:07 AM

Edit Log: