Hi Monks, I need your help. I have no perl programming experience and have been using a banner exchange script for a long time now successfully until I migrated over to a new server with a newer version of perl (5.8.8 to 5.10.1). I am wondering if someone could help me to update the script to current standards. When trying to login to admin I see these errors in my logs:

$* is no longer supported at ads_admin.pl line 4296. Premature end of script headers: ads_admin.pl.

I have researched on google and see that I have to make changes using /s or /m but as I stated I have no programming experience. Can anyone help me? Here is the code:

if ($mailprog eq "SMTP") { unless ($WEB_SERVER) { $WEB_SERVER = $ENV{'SERVER_NAME'}; } if (!$WEB_SERVER) { &Error_Mail; } unless ($SMTP_SERVER) { $SMTP_SERVER = "smtp.$WEB_SERVER"; $SMTP_SERVER =~ s/^smtp\.[^.]+\.([^.]+\.)/smtp.$1/; } # local($AF_INET) = ($] > 5 ? AF_INET : 2); # local($SOCK_STREAM) = ($] > 5 ? SOCK_STREAM : 1); local($AF_INET) = 2; local($SOCK_STREAM) = 1; $, = ', '; $" = ', '; local($local_address) = (gethostbyname($WEB_SERVER))[4]; local($local_socket_address) = pack('S n a4 x8', $AF_INET, 0, +$local_address); local($server_address) = (gethostbyname($SMTP_SERVER))[4]; local($server_socket_address) = pack('S n a4 x8', $AF_INET, '2 +5', $server_address); local($protocol) = (getprotobyname('tcp'))[2]; if (!socket(SMTP, $AF_INET, $SOCK_STREAM, $protocol)) { &Error +_Mail; } bind(SMTP, $local_socket_address); if (!(connect(SMTP, $server_socket_address))) { &Error_Mail; } local($old_selected) = select(SMTP); $| = 1; select($old_selected); $* = 1; select(undef, undef, undef, .75); sysread(SMTP, $_, 1024); print SMTP "HELO $WEB_SERVER\r\n"; sysread(SMTP, $_, 1024); while (/(^|(\r?\n))[^0-9]*((\d\d\d).*)$/g) { $status = $4; $message = $3; }

In reply to $* is no longer supported by nootkan

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.