in reply to
Tk focus
The snippet that you've provided isn't workable. That said, you want to see the man page for Tk::focus. It's a built-in for Tk, so just enter
man focus
[download]
It should answer your question.
Comment on
Re: Tk focus
Download
Code
In Section
Seekers of Perl Wisdom