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" } } }
In reply to Script Issues by Iowachaser
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |