Iowachaser has asked for the wisdom of the Perl Monks concerning the following question:
Hello All, thank you for your great site and allowing a minion such as myself to have access to the great Perl Masters.
I have a script I have been attempting to run on my shared web server running Perl 5.8.8.
This script checks out ok during error checks and runs just fine on my own pc via Strawberry Perl. This has also been excuted on a stand alone box running 5.4.4, again with no issues.
However when posting on my web servers, I continuously get the "Internal Server Error". A check of the error log reveals syntax errors on lines 30 and 35. This script has been tried on different servers from different hosts as well.
I am not a Perl guru, so I am looking for some assistance. I have been through numerous trouble shooters to attempt a solution, but have run out of options. This script was given to me by a friend that uses it as is. This script outputs a preformatted text file it you will.
I appreciate anybody's help they could give to enable this script to run properly on my webserver.I would like to learn Perl in the future, just haven't had the time.
#!/usr/bin/perl -w use LWP::Simple; @show = ( 'Mike Cox*', 'Willard Sharp', ); print "Content-type: text/plain\n\n"; print <<EOF; Refresh: 1 Threshold: 999 Title: Into The Meso SN Locations Font: 1, 14, 0, "Arial" IconFile: 1, 22, 22, 11, 11, "http://www.spotternetwork.org/icon/spott +ernet.png" IconFile: 2, 15, 25, 8, 25, "http://www.spotternetwork.org/icon/arrows +.png" IconFile: 6, 22, 22, 11, 11, "http://www.spotternetwork.org/icon/spott +ernet_new.png" EOF my $sn = get 'http://www.spotternetwork.org/feeds/gr.txt'; $x = length $sn; $sn = substr($sn, 343, $x-343); my @values = split('End:', $sn); foreach my $val (@values){ if($val =~ m/Text:\s15\,\s10\,\s1\,\s\"(.+)\"/g){ my $name = $1; if ($name ~~ @show){ print $val; print "End:\n" } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Script Issues
by stevieb (Canon) on Apr 08, 2016 at 00:39 UTC | |
|
Re: Script Issues
by LanX (Saint) on Apr 08, 2016 at 01:48 UTC | |
|
Re: Script Issues
by james28909 (Deacon) on Apr 08, 2016 at 00:41 UTC | |
by Anonymous Monk on Apr 08, 2016 at 01:15 UTC | |
by AnomalousMonk (Archbishop) on Apr 08, 2016 at 01:43 UTC | |
by Anonymous Monk on Apr 08, 2016 at 03:30 UTC | |
by LanX (Saint) on Apr 08, 2016 at 10:44 UTC | |
by Anonymous Monk on Apr 08, 2016 at 23:12 UTC | |
by james28909 (Deacon) on Apr 08, 2016 at 02:59 UTC | |
by 1nickt (Canon) on Apr 08, 2016 at 19:29 UTC | |
by Anonymous Monk on Apr 08, 2016 at 23:04 UTC | |
|
Re: Script Issues
by Iowachaser (Novice) on Apr 08, 2016 at 19:12 UTC | |
by haukex (Archbishop) on Apr 08, 2016 at 20:43 UTC | |
by Iowachaser (Novice) on Apr 09, 2016 at 01:27 UTC | |
by haukex (Archbishop) on Apr 09, 2016 at 09:41 UTC | |
by Iowachaser (Novice) on Apr 09, 2016 at 17:41 UTC | |
by AnomalousMonk (Archbishop) on Apr 09, 2016 at 23:30 UTC |