1. Save the script as if.pl in the PERLSCRIPTS folder, then upload it to the perlscripts directory on the Web server.

    Here's what the relevant lines in this script do:
  • $GoodPassword = 'acme';

    Assigns the value “acme” to the variable $GoodPassword.

  • if ($request{'password'} eq $GoodPassword){

    Compares the password word typed in the text box on if.html to the password assigned to the variable $GoodPassword.

    If they’re the same, then the code between the curly braces is executed:

    print "<b>Acme Password verified!</b><br>\n";

    TIP: The command eq is used to compare to text variables. Don’t use the = sign—that’s for comparing numbers.

  1. Upload if.pl to the perlscripts directory on the Web server, then set its permissions so that anyone can execute it.