Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

if statements

Status
Not open for further replies.

fanfavorite

IS-IT--Management
Apr 3, 2003
5
CA
Hi guys,

I have this script that I am trying to do and I am having problems with it. It's an order page in html that calls on a formmail script and this script I'm trying to modify. I put my script in a text document for you guys to view at The order page
is located at I just need help with an if statement or possibly another solution to make sure that only the items bought are the ones that show up in the list. I simplified it to only 2 items to make things easier. I know the tax, shipping and total are off, but I know how to fix that. I just need to know the proper procedure for if statements in perl.

I tried:

if ($in{quantity}) != 0 {
print &quot;<tr valign=top>\n&quot;;
.....
etc
}

But this wouldn't work. What am I doing wrong?

-John C.
 
The syntax for if statement is
[tt]
if ( test-expression ) {
code goes here
}
[/tt]
so you just need to move the closing parenthesis to completely enclose the test.

jaa
 
Thanks!! I knew I was making one stupid mistake.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top