in reply to strange scope
By doing this,
if (my $x = 1)You are testing if the variable assignment works which is the wrong way to approach this problem. Try this,
my $x = 1; if ($x > 1) { } # Do something if greater than one elsif ($x < 1) { } # Do something else here
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: strange scope
by graff (Chancellor) on May 23, 2007 at 01:48 UTC |