in reply to Ternary Operator with Subroutine

Specifically:
sub { print 'a'; print 'b' }
constructs a code reference; if you saved this, you could call it later. It does not execute the code! That's the "reference constructor" in the message.

You're not assigning the result of this constructor to anything, which is the "void context" part.

So Perl is saying "you made an anonymous sub reference and then you threw it away. Did you actually want to do that?"