It turns out that an array in scalar context returns something quite useful -- it's length, or it's content joined with the punctuation variable $,, depending if it is being used as a number or as a string. This is what lets if (!@a) {print "\@a is empty!"} work.No. You said the two cases are numeric @a and string @a. That's actually @a interpolated and scalar @a. You might even call interpolated-@a as an single-case only type of context except that if you or I did it we'd be wrong. Its also scalar context , it just creates a different optree.
In reply to Re: Constructing Context
by diotalevi
in thread Constructing Context
by theorbtwo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |