CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
syntax error, please help!

 



emelin
stranger

Feb 21, 2001, 2:08 AM

Post #1 of 2 (250 views)
syntax error, please help! Can't Post

syntax error at search.cgi line xx, near "$thing("
syntax error at search.cgi line xx, near "}"

What am I doing wrong?
I'm trying to search through several html documents (stored in the array), find a certain word and put this into a link...

@text = ($html1,$html2,$html3,$html4,$html5,$html6,$html7,$html8,$html9,$html10);

foreach $page(@text) {
if ($page =~ /$FORM::searchfor/ig) {
@rows = split (/TR/, $page);
foreach $row(@rows) {
if ($row =~ /$FORM::searchfor/g) {
@stuff = split (/"/, $row)
foreach $thing(@stuff) {
if ($thing =~ /$FORM::searchfor/ig) || ($thing =~ /AI/g) {
print "<a href=http://www.something.com/${thing}>${thing}</a>";
}
}
}
}
}
}




japhy
Enthusiast

Feb 21, 2001, 6:46 AM

Post #2 of 2 (247 views)
Re: syntax error, please help! [In reply to] Can't Post

You're missing a semicolon at the end of this line:


Code
@stuff = split (/"/, $row)

Jeff "japhy" Pinyan -- accomplished hacker, teacher, lecturer, and author

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives