in reply to New user, confusion over print and lists
From the documentation for reverse:
Used without arguments in scalar context, reverse() reverses $_.
That is, $_ is only "special" to reverse when:
In the case of print reverse;, it is not in scalar context, so $_ is not special. You're calling reverse with the empty list as an argument. It reverses that list and return the result (which is still the empty list).
|
|---|