I would still need to break to jump out of the select and for. break only jumps out of the enclosing for OR select. This would still be an issue if I put it in a function, although I guess I could return there instead of break.