This "Useless use" message can be easily made by just having a statement with only a string literal inside. The message reads interestingly and rather high context -- meaning: readers need to learn at least a little bit about the concept of context in Perl programming language, to be able to understand that no words in that message are useless or void.

# perl x.pl
Useless use of a constant ("forty-two") in void context at x.pl line 3.

# cat x.pl
use v5.36;

"forty-two";

#perl