Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Why doesn't Perl provide %_ as the hash equivalent of @_ in subs?

by moritz (Cardinal)
on Sep 26, 2013 at 15:10 UTC ( #1055855=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    yoursub(a => 1);
    yoursub({ a => 1 });
    $obj->meth(a => 1);
    $obj->meth({a => 1});
    
  2. or download this
    http_get $url, timeout => 20, sub {
       # callback here
    };
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1055855]
help
Chatterbox?
[Discipulus]: ovedpo15 A subroutine may be called using an explicit & prefix. The & is optional in modern Perl... see perlsub in docs and search for ampersand
[Discipulus]: it has some, even dangerous, implication
[Discipulus]: I still use but I also attract many critics for this: I use when I call subs defined in the very same file, just to recognize them. You can avoid (but sometimes is needed)

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (13)
As of 2018-05-22 12:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?