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!


In reply to How to embed Perl in HTML by html546897

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.