You'll have to be a bit more descriptive. When you say that you're not getting what you expected, what
are you getting? Here's a couple of things that you might want to check (in no particular order):
- Is the Web server actually running?
- Is your shebang line correct? Typically with ActivePerl it's something like this:
#!c:/perl/bin/perl.exe -wT
The -wT are optional and shouldn't affect whether or not your script is running, but they are a good habit to get into. Make sure that the path to your Perl executable matches the path on the shebang line!
- Can you run the script from the command line? That's important! If you can't, you won't be able to run it through a browser, either.
- Check your documentation. Some servers will not run scripts unless you have a .cgi extension. Others will not run them unless they are in a particular directory.
- Does entering http://localhost actually call up the default home page? If not, the problem is with the server installation.
- Are you running NT and possibly having an issue with permissions?
- Are you outputting the Content-type: header before other headers?
use CGI qw/:standard/;
print header;
- Have you verified that all of your systems calls return true? For instance, don't open a file unless you check the value of $!.
open FILE, "<$somefile" or die $!;
- Have you checked the server's error logs? What do they say?
- Have you read the ActivePerl FAQ?
Cheers,
Ovid
Join the Perlmonks Setiathome Group or just go the the link and check out our stats.