Newbie needs help, please. - TechRepublic
Question
January 14, 2007 at 07:57 PM
dlauxx

Newbie needs help, please.

by dlauxx . Updated 19 years, 6 months ago

New to programming perl. Please help.

Downloaded ActiveState “ActivePerl-5.8.8.819-MSWin32-x86-267479.msi” and installed on my WinXP Pro PC.

Try to test programs written in .html calling .pl (supposed to be on web server) on this TESTING environment. But no luck.

What did I miss?

++++++++++ .htm code
(FORM ACTION=”c:/per/bin/backatcha.pl” METHOD=GET)
(p)What is your favorite color?(INPUT NAME=”favcolor”)(/p)
(INPUT TYPE=submit VALUE=”Send form”)
(/FORM)
* all angle brackets are replaced with “(” or “)”.
++++++++++ backatcha.pl code
#!/usr/local/bin/perl (.pl file stored on “c:\perl\bin\”)
use CGI ‘:standard’;
print header();
print start_html();
for $i (param()) {
print “”, $i, “: “, param($i), “\n”;
}
print end_html();
++++++++++

This worked when on real web server. (with #!/usr/bin/perl not local)

What is http://localhost/…… , do I need to configure this first.

Thank you for your help.

This discussion is locked

All Comments