@hands=split(" ",<>); $myhand=$hands[0]+0; $yourhand=$hands[1]+0; print &judge($myhand,$yourhand); sub judge{ return "Drew" if $_[0]==$_[1]; $isSwap=0; if($_[0]>$_[1]){ $isSwap=1; ($_[0],$_[1])=($_[1],$_[0]); } $isWon=0; $isWon=1 if $_[1]-$_[0]==1; $isWon^=1 if $isSwap; return "Won" if $isWon; return "Lost" }