Turns out we're both wrong.
On the first technical note, I'm not wrong because all I did was to quote perlfunc. :-)
Empty lists are interpreted as undef in scalar context.
On the second technical note, there's no such thing as empty lists in scalar context, as far as I know. Your examples only show that eval returns the empty list in list context.
eval returns an empty list.
In list context it returns an empty list. In scalar context it returns undef. It doesn't return an empty list that evaluates to undef, because if it's in scalar context there can't be any list.
IMHO, if context isn't specified in the documentation, all contexts are implied. So either perlfunc needs to be fixed to say that it returns undef in scalar context and the empty list in list context, or eval need to return undef in list context too.
lodin
In reply to Re^6: Blessing interior hashes
by lodin
in thread Blessing interior hashes
by throop
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |