troubleshooting Question

Using LWP in Perl script getting Internal Server Error

Avatar of firefox950
firefox950 asked on
PerlScripting Languages
2 Comments1 Solution382 ViewsLast Modified:
I am trying to run a Perl program on my Apache Server. The code:

#!/usr/usc/bin/perl -w

use LWP::Simple;
use strict;
my $content = get("");
die "Couldn't get it!" unless defined $content;

I think, it is fine, but it gives me an Internal Server Error. I checked the Error Logs it showed this:
"Premature end of script headers: "

Kindly let me know, how to trace it and what can be a possible solution, I have tried to check everything, from path , to access rights, but does not seem to work. It works fine, if I run a simple  printout, but the moment I start using LWP, it crashes down giving Internal Server Error
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 2 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros