in reply to strange scope
if (my $x = ...) { ... } elsif (my $x = ...) { ... }
Looking at it this way, you will notice that both $x's are actually in the same block. Hence the error.
There are no 'curlys' enclosing the seperate conditions.
So use something like Herkum's solution.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: strange scope
by liverpole (Monsignor) on May 23, 2007 at 01:02 UTC | |
by jasonk (Parson) on May 23, 2007 at 14:29 UTC | |
by Beechbone (Friar) on May 23, 2007 at 15:31 UTC | |
by blazar (Canon) on May 23, 2007 at 09:16 UTC |