Your immediate problem is simple: sub search goes into an infinite loop if $search_pattern is undefined. Instead of a goto, simply return early, as in return unless defined $search_pattern; which will cause the Tk event loop to resume and the UI to wait for the user to try again.
In reply to Re: Stopping bad input (harder than sanitizing)
by jcb
in thread Stopping bad input (harder than sanitizing)
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |