On Thu, Feb 15, 2001 at 11:23:10AM -0800, Nathan Wiger wrote:
> 
> I agree with this statement. Perhaps someone who was around during the
> initial 'my' discussions can shed some light on why it binds so tightly.
> I have observed you can do something like this:
> 
>    my $OUTER = '';
> 
>    if ( $some_value ) {
>       # 'my' only on the first one
>       (my $inner, $OUTER) = split;
>       
>       # more code that uses $inner ...
>    }
> 
>    if ( $OUTER ) {
>       # $inner not here, but that's fine...
>    }
> 
> But I have never found a situation where this is so useful to justify
> the other problems it creates. However, there may well be true technical
> reasons why "my $x, $y, $z" does not do what many think it should.

As I wrote elsewhere, other reasons not to change the behaviour of my:

    GetOptions (foo => \my $foo,
                bar => \my $bar);

    tie my $shoe => $tring;


Abigail

Reply via email to