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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.