in reply to Number gussing game

One thing is your subroutine call ✓ either declare sub check earlier in the file, so you can just say $result = check;, or add parentheses ($result = &check();) (or both). Calling a sub with & but without () has a special effect that is rarely wanted or needed; it's harmless in this case, but not doing it accidentally is a good habit to form.

I also note that if $target is 100, $guess will reach 99 and stay there forever; try having $max be one more than the end of the possible range.