Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Why does reverse in list context operate on () instead of @_ or @ARGV

by ikegami (Pope)
on Aug 27, 2012 at 15:30 UTC ( #990006=note: print w/ replies, xml ) Need Help??


in reply to Why does reverse in list context operate on () instead of @_ or @ARGV

Why does reverse in list context operate on () instead of @_ or @ARGV?

It's not unimportant that very little that expects a list distinguishes between an empty list and an unspecified list, and those that do* all default to $_.

* — Only print and say do. reverse in scalar context does too, but that's because it's required to accept a list in case it's called in list context.


Comment on Re: Why does reverse in list context operate on () instead of @_ or @ARGV
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2015-07-03 23:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (57 votes), past polls