Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
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 taking refuge in the Monastery: (17)
As of 2014-08-27 17:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (246 votes), past polls