> > But the C one works fine. Why? Because myint's been lexically declared!
> 
> Sure.  But you omitted the same lexical declaration in the Perl code.
> The C example has
> 
>         int myint;
> 
> at the outer scope.  If you added
> 
>         my $myint;
> 
> at the same place in the Perl code, it would do the same thing.

Exactly, this was actually my point. my() acts as a lexical declaration.

-Nate

Reply via email to