Am I correct in guessing that the "defined-or" convinced Perl that I wanted the returned array to be interpreted in scalar context?
You are correct. From perlop:
Thus, EXPR1 // EXPR2 returns the value of EXPR1 if it's defined, otherwise, the value of EXPR2 is returned. (EXPR1 is evaluated in scalar context, EXPR2 in the context of // itself).
In reply to Re: Odd (to me) case of wrongly guessing context
by ig
in thread Odd (to me) case of wrongly guessing context
by ibm1620
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |