I'm writing a flat-file publications databse CGI and I'm recieving an compilation error on the lines indicated below, any ideas??
Any help would be more than welcome.

if ($#results >= 0) { //line 135 foreach $record (@results) { chomp($record); ($author,$year,$title,$journal,$conf_name,$city,$volume,$issue,$pages, +$institution,$date,$type,$publisher,$edition,$translator,$scale,$call +_num,$label,$abstract,$notes,$isbn,$url,$editor,$keywords) = split(/\ +|/,$record); if ($title ne ""){ print "Title: $title\n";} if ($author ne ""){ print "Author: $author\n";} if ($year ne ""){ print "Year: $year\n";} if ($journal ne ""){ print "Journal: $journal\n";} if ($conf_name ne ""){ print "Conference: $conf_name\n";} if ($city ne ""){ print "City: $city";} if ($volume ne ""){ print "Volume: $volume\n";} if ($issue ne ""){ print "Issue: $issue\n";} if ($pages ne ""){ print "Pages: $pages\n";} if ($institution ne ""){ print "Institution: $institution\n";} if ($date ne ""){ print "Date: $date\n";} if ($type ne ""){ print "Type: $type\n";} if ($publisher ne ""){ print "Publisher: $publisher\n";} if ($edition ne ""){ print "Edition: $edition\n";} if ($translator ne ""){ print "Translator: $translator\n";} if ($scale ne ""){ print "Scale: $scale\n";} if ($call_num ne ""){ print "Call Number: $call_num\n";} if ($label ne ""){ print "Label: $label\n";} if ($abstract ne ""){ print "Abstract: $abstract\n";} if ($notes ne ""){ print "Notes: $notes\n";} if ($isbn ne ""){ print "ISBN/ISSN: $isbn\n";} if ($url ne ""){ print "URL: $url\n";} if ($editor ne ""){ print "Editor: $editor\n";} } //line 187 }
The errors are as follows:

syntax error at line 135 near ") {"
syntax error at line 187 near "}"

lines are marked in the scrip selection. Thanks!

In reply to Execution/Compilation Error by qball83

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.