Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: What is the purpose of local *_ = \my $a in File::Find?

by YenForYang (Beadle)
on May 16, 2018 at 05:27 UTC ( [id://1214608]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1214608]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (2)
As of 2024-04-20 08:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found