YenForYang has asked for the wisdom of the Perl Monks concerning the following question:
I was looking through the source code of Find.pm of File::Find. The comments mention why local()-izing is needed, which I kinda-sorta understand since the the callback functions passed in may call find or finddepth again, so local essentially makes a copy of the global variables (am I right or wrong here?). However, I don't understand why local *_ isn't sufficient. Why is set to \my $a? Why \my $a in particular and not some other variable--I mean, could any variable substitute \my $a? Thanks.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: What is the purpose of local *_ = \my $a in File::Find?
by ikegami (Patriarch) on May 11, 2018 at 20:18 UTC | |
by YenForYang (Beadle) on May 16, 2018 at 05:27 UTC | |
by ikegami (Patriarch) on May 17, 2018 at 00:54 UTC |
Back to
Seekers of Perl Wisdom