Consult the server's error logs and you'll see that you're getting a prototype mismatch error because two things are trying to declare the subroutine head with different prototypes.
If you bother to read the documentation for LWP::Simple it explains just why you're getting that error and what the workaround is.
Note that if you are using both LWP::Simple and the very popular CGI.pm module, you may be importing a head function from each module, producing a warning like "Prototype mismatch: sub main::head ($) vs none". Get around this problem by just not importing LWP::Simple's head function, like so:Then if you do need LWP::Simple's head function, you can just call it as LWP::Simple::head($url).use LWP::Simple qw(!head); use CGI qw(:standard); # then only CGI.pm defines a head()
In reply to Re: premature end of script headers?
by Fletch
in thread premature end of script headers?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |