Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

hi guyz 1

Status
Not open for further replies.

baad

Programmer
Joined
Apr 10, 2001
Messages
1,481
Location
RU
hi all
i'm tryin 2 learn perl, (just started, my experience for now is about 2 hours)
i've allready been 2 & some other sites but what is ur guyz recomendation on what wuld be a good enough 2 start learnin it?

now i'm tryin 2 write simple-silly scripts & gettin errors >:-<.. thats a bit irritatin..

here is the simple example:
#!/usr/bin/perl
print &quot;Content-type:text/html\n\n&quot;;
print &quot;<html><head><title>Let go!!</title></head>\n&quot;;
print &quot;<body>\n&quot;;
print &quot;blah blah blah\n&quot;;
print &quot;</body></html>\n&quot;;


& here is what i'm gettin instead of desired page:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to
complete your request.


i think it is 'coz i wrongly pointed the #!/usr/bin/perl

what else culd it be?

thunx a lot..
regards, vic
 
vic,

Nothing is wrong with your script. I guess the first thing I would ask is what server are you running this script from? Either way, you are having configuration problems. If it is an NT server then the first line is ignored anyway. It is only looked at on a UNIX server.

There are several books on Perl that are great. Learning Perl by O'Reilly is my favorite. It will walk you through step by step. Also, there is a book by Peachpit called Visual Quickstart Guide for Perl. I included a few links that may get you started.

This one is pretty good.


Hope this helps.

Brandon
 
thunx luckydexte, now i'm gone readin ur links..

btw, i'm runnin my script from Apache/1.3.12 Ben-SSL/1.40 Server regards, vic
 
Make sure that the path to perl on the first line is correct. Try #!/usr/local/bin/perl and see if that works. The usual cause of an &quot;Internal Server Error&quot; is a syntax error in the program.
Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
hie tsdragon, thunx for replyin, i've fixed it it was my fault: in the script wich i uploaded on the server was the followin header:
print &quot;Content-type:text/html\n&quot;;
but there have to b 2 lf..
now it works nice & i'm happy X-)
i'll come here with a lotta silly questions very very soon.. spooky, huh? :-I regards, vic
 
There's really no such thing as a silly question. How else are you supposed to learn?
Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top