sub score { my$s;sub S{$_[0]=~X?10:$_[0]}$s+=($l=shift)=~X?10+($_[1]eq'/'?10:S($_[0])+S$_[1]):($r=shift)eq'/'?10+S$_[0]:$l+$r for 1..10;$s }