in reply to scoping across parent/child relationship
The code actually looks OK, but be aware that parent/child relationships and lexical scoping (the kind you're getting with my) are very different things. You may find it helpful to read MJD's excellent document Coping with Scoping or Variable Scoping in Perl: the basics (which actually gets into fairly advanced stuff).
Wild guess: are you trying to use the variables declared in the else horn elsewhere in the program?
|
|---|