sub test_wantarray{ wantarray ? Y : N; } print "Hello" . &test_wa . "World\n"; print "Hello", &test_wa, "World\n"; output: HelloNWorld HelloYWorld