in reply to Re: New user, confusion over print and lists
in thread New user, confusion over print and lists
When reverse has no arguments, doesn't it just take $_? Is writing reverse; the same as reverse $_;? I'm imagining this to be the behavior, because print; and print $_; seem identical when I test them.
EDIT: From the doc, I seems that reverse will ONLY work on $_ if it is in scalar context, which print is not. So I give it no arguments in list context, does reverse ignore $_, which the doc seems to imply it does. If so, is it just returning an empty list which is then passed to print?
|
|---|