Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^5: Why doesn't Perl provide %_ as the hash equivalent of @_ in subs? (ugly++)

by BrowserUk (Pope)
on Sep 27, 2013 at 10:53 UTC ( #1055964=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub withNames{ local %_ = @_; ++$_{$_} for keys %_; };;
    
    ...
          Rate    a    b
    a  32135/s   -- -75%
    b 127549/s 297%   --
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2014-09-19 02:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (129 votes), past polls