[EMAIL PROTECTED] (Jenda Krynicky) writes:
> From: "Michael R. Wolf" <[EMAIL PROTECTED]>
> > When dealing with "my", you can look at the line that
> > declares it, then backup to the smallest enclosing brace.
> > The variable belongs to that scope. A scope is defined by
> > an open/close brace pair. Lexicals are accessible anywhere
> > within the code of that scope.
>
> Not exactly true. The scope is from the definition to the closing
> brace. Not the whole block. Try this
>
> $perl
> use strict;
> {
> print "$x";
> my $x = 5;
> print "$x";
> }
[...]
Thanks! I think I had my C brain in.
--
Michael R. Wolf
All mammals learn by playing!
[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]