On Fri, 17 Feb 2006 12:05:08 -0800, you wrote:

>OK, then, consider this program. Notice that there's a global $i 
>which has the value 5. Now, when func() is called, if the "my $i" did 
>not create a new lexically scoped variable, then the print line would 
>print "i = 5". But it doesn't - obviously because the lexical 
>variable was created, but is undefined because $b is false.
>
>our $i = 5;
>our $b = 0;
>
>func();
>
>sub func {
>
>my $i = 3 if $b;
>print("i = $i\n");
>}

If you look in perldoc perlsub, you'll see the section on my() variables
specifically mentions that putting statement modifiers on my() has
undefined results, so all of this discussion is moot.
-- 
Eric Amick
Columbia, MD
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to