Specials | Announcements | Contact | Site Map
Willmaster.com
Hijack-proof forms. Surveys. List building.

Solid, safe website tools.

Whatever your need, Will Bontrager builds powerful software solutions.

Affiliate Cookie Setter
Search WillMaster.com:

WillMaster > Support > CGI Q&A

If you don't find the answer to your question in these archives, ask your CGI question at the Current Master Series CGI Forum.

basic perl if, elseif, else statements

Author Message
19Mar04

Matt
Subject: basic perl if, elseif, else statements

I am new to perl, trying a tutorial on if elseif else statements, copying right from a book example. I'm getting an error on the line

elseif ($guess < $im_thinking_of) {
print "you guessed wrong"
it says it's "near ) {" but that's all.

20Mar04

Will

[Email]

In response to: basic perl if, elseif, else statements

Matt, there's not enough code in your example to see if there might be anything else awry, but you might try changing

elseif

to

elsif

Note that you can post code on this bulleting board by putting it between PRE tags.