http://qs321.pair.com?node_id=344893

qball83 has asked for the wisdom of the Perl Monks concerning the following question:

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!