I am working on a sub and I keep getting this error during compilation: getrotatorform.cgi: Can't find string terminator "'" anywhere before EOF at functions.pl line 1029. Compilation failed in require at getrotatorform.cgi line 16. Could someone take a look? here's the sub:
sub dochangerotatorurls { $sth=runSQL("SELECT rurl2,rurl3,rurl4,rurl5,rurl6,rurl7 FROM rotator W +HERE userid='$login'"); ($oldrurl2,$oldrurl3,$oldrurl4,$oldrurl5,$oldrurl6,$oldrurl7)=$sth- +>fetchrow; @oldrurl=('$oldrurl2', '$oldrurl3', '$oldrurl4', '$oldrurl5', '$ol +drurl6', '$oldrurl7'); $url2=$q->param('rurl2'); $url3=$q->param('rurl3'); $url4=$q->param('rurl4'); $url5=$q->param('rurl5'); $url6=$q->param('rurl6'); $url7=$q->param('rurl7'); @url=('$url2', '$url3', '$url4', '$url5', '$url6', '$url7); foreach $url (@url) { foreach $oldrurl (@oldrurl) { if ($url ne $oldurl) { # if (($url eq '') || ($url eq 'http://')) {error("Enter url");} if (!($url=~/^http:/)) {$url="http://$url";} $qurl=$dbh->quote($url); $verify_url=$url; $verify_url=~s/^.*?\/\/(.*?)[:\/].*$/$1/; $verify_url=lc $verify_url; $sth=runSQL("SELECT COUNT(*) FROM blocksites WHERE name='$verify_ +url'"); ($num)=$sth->fetchrow; error("blockeddata") if $num; } else {@qurl=$dbh->quote(@oldrurl);} } } runSQL("UPDATE rotator SET rurl2=$qurl[0] rurl3=$qurl[1] rurl4=$qur +l[2] rurl5=$qurl[3] rurl6=$qurl[4] rurl7=$qurl[5] WHERE userid='$log +in'"); messagecp("Site rotator urls updated"); } 1;
line 1029 is the last runSQL update...yes, learning thanks

In reply to string terminator "'" by cgikid

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.