Did you forget a curly brace after the else? Or is that just a typo in your email?
Jonathon -----Original Message----- From: Portman [mailto:[EMAIL PROTECTED] Sent: Thursday, July 27, 2006 11:47 AM To: wdvltalk@lists.wdvl.com Subject: [wdvltalk] Perl question Hi all, I am trying to change a program that I wrote a long time ago and I keep getting a "500 Server Error" when I make changes. The plan is to have the program check if the total of the order is over $50. If so, the S&H charge is $5. If not, the S&H charge is $8. What I have so far is: # Find out what state is selected and get the corresponding percentage to use my $selectedState=$q->param('state'); my $shippingCharge=$shipcost{$selectedState}*$total+5; which works fine. When I try and change it to: # Find out what state is selected and get the corresponding percentage to use my $selectedState=$q->param('state'); if ($total < 50) { my $shippingCharge=$shipcost{$selectedState}*$total+8; } else my $shippingCharge=$shipcost{$selectedState}*$total+5; } I get the error. Can anyone tell me why I am getting the error? The rest of the program works fine - just falls apart when I add those lines in. Thanks, Riva ____ . The WDVL Discussion List from WDVL.COM . ____ To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] or use the web interface http://e-newsletters.internet.com/discussionlists.html/ Send Your Posts To: wdvltalk@lists.wdvl.com To change subscription settings, add a password or view the web interface: http://intm-dl.sparklist.com/read/?forum=wdvltalk ________________ http://www.wdvl.com _______________________ You are currently subscribed to wdvltalk as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] To unsubscribe via postal mail, please contact us at: Jupitermedia Corp. Attn: Discussion List Management 475 Park Avenue South New York, NY 10016 Please include the email address which you have been contacted with. ____ The WDVL Discussion List from WDVL.COM ____ To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] or use the web interface http://e-newsletters.internet.com/discussionlists.html/ Send Your Posts To: wdvltalk@lists.wdvl.com To change subscription settings, add a password or view the web interface: http://intm-dl.sparklist.com/read/?forum=wdvltalk ________________ http://www.wdvl.com _______________________ You are currently subscribed to wdvltalk as: archive@jab.org To unsubscribe send a blank email to [EMAIL PROTECTED] To unsubscribe via postal mail, please contact us at: Jupitermedia Corp. Attn: Discussion List Management 475 Park Avenue South New York, NY 10016 Please include the email address which you have been contacted with.