http://www.perlmonks.org?node_id=1214608


in reply to Re: What is the purpose of local *_ = \my $a in File::Find?
in thread What is the purpose of local *_ = \my $a in File::Find?

Awesome, thanks for the explanation.

What do you mean though by

Note that this aliases $_ to the scalar, but File::Find does not take advantage of that feature.
Specifically the part about not taking advantage of the feature. What features could be taken advantage of? Thanks

EDIT:

Oh wait are you saying that $a could be used like $_ (they become equivalent?). Or is there something else?

Replies are listed 'Best First'.
Re^3: What is the purpose of local *_ = \my $a in File::Find?
by ikegami (Patriarch) on May 17, 2018 at 00:54 UTC
    $ perl -E'local *_ = \my $s; $_ = 123; say $s; $s = 456; say $_;' 123 456