in reply to One out of three ain't bad

well, you can write it a little bit shorter...

my $count = 0; $_ and $count++ for ($x,$y,$z); if (1 == $count) { print "Exactly one variable set\n"; }
or or even pack the $count and ++ into a do:
if (1 == do {my $cnt=0; $_ and $cnt++ for ($x,$y,$z); $cnt } { print "Exactly one variable set\n"; }

But I doubt that this is more readable

update: I'd prefer a grep solution as posted by tye

if (1 == grep {$_} ($x,$y,$z)) { print "Exactly one variable set\n"; }

Best regards,
perl -e "s>>*F>e=>y)\*martinF)stronat)=>print,print v8.8.8.32.11.32"