I've never used LWP::Simple, so there may be something else going on, but one thing I think is, you need to print a header, to tell the browser to expect html. The easiest way to do this is
use CGI qw(:standard);
print header;
(It may seem like a sledgehammer to crack a nut, using a big module like CGI.pm just to print out a little old header, but... it does get the nut cracked. I used to get really bored typing
print "content-type:text/html\n\n";.)
One other thing - you say all you get in the way of an error message is
internal server error? Then CGI:Carp is your friend. Add these lines:
use CGI::Carp qw(fatalsToBrowser warningsToBrowser);
print header;
warningsToBrowser(1);
... then it'll send you some more informative stuff, delivered straight to your browser (or View Source to see the warnings).
§
George Sherston
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.