troubleshooting Question

Using LWP in Perl script getting Internal Server Error

Avatar of firefox950
firefox950 asked on
Scripting LanguagesPerl
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
Log in to continue reading
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform for $9.99/mo
View membership options
Unlock 1 Answer and 2 Comments.
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
The Value of Experts Exchange in My Daily IT Life

Experts Exchange (EE) has become my company's go-to resource to get answers. I've used EE to make decisions, solve problems and even save customers. OutagesIO has been a challenging project and... Keep reading >>


Owner of Outages.IO
Phoenix, Arizona, United States
Member Since 2016
Join a full scale community that combines the best parts of other tools into one platform.
Unlock 1 Answer and 2 Comments.
View membership options
“All of life is about relationships, and EE has made a virtual community a real community. It lifts everyone's boat.”
William Peck

Member since 2004