html546897 has asked for the wisdom of the Perl Monks concerning the following question:
Can someone please give a detailed tutorial on how to embed Perl in HTML? This means give specific instructions on what to download, where to download it, what files I need to download, and how I would somehow put that into my HTML file.
My code is:
# "E:\My Vaults\My Vault\Perl\happy.pl" # Displays a warm greeting. print "What is your name? "; my $name = <STDIN>; chomp($name); print "Hello, $name! I am a computer! Austin is my author! He created +this Perl quiz!\n"; # User greets the computer. print "Please greet me so I know I am welcome.\n"; my $greet = <STDIN>; # Displays difference between ages. chomp($greet); print "$greet to you, too. What year were you born in, $name? "; my $dob = <STDIN>; if (($dob eq '')) { print "Hey! Why won't you answer?\n"; } if (($dob < 1996)) { my $difference = 1997 - $dob; chomp($difference); print "You are $difference years older than my author, Austin.\n"; } if (($dob > 1998)) { my $difference = $dob - 1997; chomp($difference); print "You are $difference years younger than my author, Austin.\n +"; } if (($dob == 1998)) { my $difference = $dob - 1997; chomp($difference); print "You are $difference year younger than my author, Austin.\n" +; } if (($dob == 1996)) { my $difference = 1997 - $dob; chomp($difference); print "You are $difference year older than my author, Austin.\n"; } if (($dob == 1997)) { print "You are the same age as my author, Austin!\n"; } # Asks favorite color. print "How many people live in your house with you? "; my $housenum = <STDIN>; if (($housenum == 5)) { print "5 people live in my author's house, too!\n"; } if (($housenum != 5)) { print "Oh. There are 5 people living in my author's house.\n"; } chomp($name); print "Good bye, $name!\n";
Thanks!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: How to embed Perl in HTML
by NetWallah (Canon) on Oct 09, 2011 at 06:49 UTC | |
Re: How to embed Perl in HTML
by anneli (Pilgrim) on Oct 09, 2011 at 05:35 UTC | |
by html546897 (Initiate) on Oct 13, 2011 at 23:23 UTC | |
by anneli (Pilgrim) on Oct 14, 2011 at 02:54 UTC | |
by Anonymous Monk on Oct 14, 2011 at 03:15 UTC | |
Re: How to embed Perl in HTML
by duyet (Friar) on Oct 09, 2011 at 07:21 UTC | |
Re: How to embed Perl in HTML
by keszler (Priest) on Oct 09, 2011 at 09:15 UTC | |
Re: How to embed Perl in HTML
by exilepanda (Friar) on Oct 09, 2011 at 06:55 UTC | |
by metaperl (Curate) on Oct 11, 2011 at 11:08 UTC | |
by exilepanda (Friar) on Oct 11, 2011 at 12:00 UTC | |
Re: How to embed Perl in HTML
by perl.j (Pilgrim) on Oct 09, 2011 at 18:56 UTC | |
Re: How to embed Perl in HTML
by wazoox (Prior) on Oct 11, 2011 at 10:00 UTC |
Back to
Seekers of Perl Wisdom