Works fine for me It prints a "1", just like it is supposed to.
Are you looking for some other behavior???
Brent
mail@redhotsw
eve H.
-Original Message-
From: Michael Fowler [mailto:[EMAIL PROTECTED]]
Sent: Sunday, August 05, 2001 10:02 PM
To: Steve Howard
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: If Statement won't work
On Sun, Aug 05, 2001 at 09:51:15AM -0500, Steve Howard wrote:
> By any chance
On Sun, Aug 05, 2001 at 09:51:15AM -0500, Steve Howard wrote:
> By any chance are you using Activestate? I have no explanation, but I have
> run across two or three times when everything should have worked, the
> variable evalueated to what it should have been, but the if refused to
> return true
That is it. I downloaded activestate to play with. I'm glad that I am not
loosing my mind and that someone else had this problem too.
Thanks for putting me at ease.
Chris
At 09:51 AM 8/5/2001, Steve Howard wrote:
>By any chance are you using Activestate? I have no explanation, but I have
>ru
By any chance are you using Activestate? I have no explanation, but I have
run across two or three times when everything should have worked, the
variable evalueated to what it should have been, but the if refused to
return true and execute. those three times I have been able to delete the
line and
The following works for me:
--snip-
#!/usr/bin/perl -w
use strict;
my $winner = 1;
if ($winner == 1) {
print "$winner\n";
}
--snip-
The above yeilds: 1
If you wanted to print "winner", then remove the '$' from the "print"
statement ;-). Oh Yeah! ...
At 11:22 AM 8/2/2001 -0500, [EMAIL PROTECTED] wrote:
>Can anyone tell me why my if statement refuses to work? It is really
>simple. I can't understand it.
>
>$winner = 1;
>if($winner == 1){
>print "$winner\n";
>}
Are you expecting the word "winner" to appear??? I've sometimes got so lost
in c