As many have pointed out, it is the missing ' on the last item in the @url line...

The low-effort way to quote multiple values into an array would be:

@url=qw($url2 $url3 $url4 $url5 $url6 $url7);
This creates a list of the words using any number of whitespace characters as seperator.

But looking at your code I am *very* sure you don't want these guys quoted, as you are comparing the values from @oldrurl with @url, which will never be the same. You'll definitely want to keep these unquoted.

In fact, the lines at the top could be replaced merely by:

@oldurl=$sth->fetchrow;

That's a spacesaver... :) The other one would be instead of all the $url? assignments:

@url = map {$q->param("rurl$_")} (2..7);

Some other tips to help you streamline your code;
use strict; # yes, it'll scare your at first, but it's worth it.
use DBI; # and it's placeholders for your selects and updates instead of interpolating.
use vi! or some other syntax-coloring editor. That would've helped catching the runaway quote...

Happy coding!


In reply to Re: string terminator "'" by Gilimanjaro
in thread 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.