--- Jenda Krynicky <[EMAIL PROTECTED]> wrote: > From: "Jonathan E. Paton"
<[EMAIL PROTECTED]>
> > > >  It loses
> > > > scope in subroutines.  
> > > 
> > > Wrong.
> > > 
> > > If you declare a variable with my() its scope will be from the
> > > declaration to the end of the enclosing block. Which for variables
> > > declared outside any {} block or eval"" means ... to the end of the
> > > file.
> > > 
> > 
> > Wrong.
> > 
> > You forgot about 'package'.
> 
> What do you mean:
> 
>       #!perl -w
>       my $x = 'Ahoj';
>       print "$x\n";
>       package foo;
>       print "$x\n";
>       __END__
> 
> I believe packages are completely irrelevant to
> lexical (declared with my()) variables.

Jonathan... nul point - my Eurovision song contest
attempt would be less than that though.  Yes, Jenda is
right, and I'm wrong (again).  Oh well, I do remember
reading that.

Jonathan Paton

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to