Thanks Sheila. That always confused me in Perl - the rest I understood
but somehow have a mental block against scoping.
Riva
Sheila Fenelon wrote:
It's a scope issue. By using 'my' inside the braces you create a new
variable that only exists inside the braces.
The WDVL Discussion List
Portman wrote:
Ah. Got it to work. I change the if ($total < 50) { my $sandh=8;} to if
($total < 50) { $sandh=8;}
Go figure.
I have this code now:
my $sandh=5;
if ($total < 50) { my $sandh=8; }
my $shippingCharge=$shipcost{$selectedState}*$total+$sandh;
and the program seems to simply sk
Ah. Got it to work. I change the if ($total < 50) { my $sandh=8;} to if
($total < 50) { $sandh=8;}
Go figure.
Riva
Portman wrote:
I have this code now:
my $sandh=5;
if ($total < 50) { my $sandh=8; }
my $shippingCharge=$shipcost{$selectedState}*$total+$sandh;
and the program seems to simpl
I have this code now:
my $sandh=5;
if ($total < 50) { my $sandh=8; }
my $shippingCharge=$shipcost{$selectedState}*$total+$sandh;
and the program seems to simply skip over the if statement. Any ideas?
Thanks,
Riva
The WDVL Discussion List from WDVL.COM
To Join wdvltalk, Send An
I tried again and the program just seems to skip over the if
statements?? Any ideas?
Jonathon Smith wrote:
Did you forget a curly brace after the else? Or is that just a typo in your
email?
Jonathon
The WDVL Discussion List from WDVL.COM
To Join wdvltalk, Send An Email To: mai
Possible it is a typo, although I did try so many things. Do you think
that could throw the error? (Just omitting the brace?)
Riva
Jonathon Smith wrote:
Did you forget a curly brace after the else? Or is that just a typo in your
email?
Jonathon
The WDVL Discussion List from WDVL.COM
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
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:
#