what's the use for block?
It stopped the innermost call to the block (and then the outer calls reached the end of the script), but didn't stop the toplevel script that called it.
P.S. In this simple case there are better ways to do it, but imagine a more complicated algorithm with several recursive calls, and the condition for stopping is complicated. Or it should stop if some error happens.
ok, that makes a whole lost more sense. Thanks.
Think of it as a
return; statement of a function.