Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://990006]
help
Chatterbox?
[LanX]: ... i.e. avoid headaches about bug reports...
[Corion]: Yeah, I've updated the documentation to mention just that :)

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (10)
As of 2017-12-12 20:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (336 votes). Check out past polls.

    Notices?