Stefany has asked for the wisdom of the Perl Monks concerning the following question:
When I run in it in the CMD ( I have Win 7 ) it works perfectly, but when I run it in the browser, I get error 500#!C:\xampp\perl\bin\perl.exe use utf8; use Text::Unidecode; use Web::Query; use DBI; print "content-type: text/html \n\n"; wq('http://example.com') ->find('h1') ->each(sub { my $i = shift; $i++; push(@array, $_->text . "\n"); return @array; }); foreach ( @array ) { print $_ . "\n"; }
Server error! The server encountered an internal error and was unable to complete yo +ur request. Error message: End of script output before headers: test.pl If you think this is a server error, please contact the webmaster. Error 500 localhost Apache/2.4.10 (Win32) OpenSSL/1.0.1i PHP/5.6.3
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Use of a module(s) fetches error 500!
by Corion (Patriarch) on Mar 11, 2015 at 12:32 UTC | |
|
Re: Use of a module(s) fetches error 500!
by locked_user sundialsvc4 (Abbot) on Mar 11, 2015 at 12:40 UTC |