It appears that you are developing a sequential program that uses Tk only to request file names.
GrandFather's example proves that this is possible. You probably see this as a compromise which gives your user some of the advantage of Tk, while sparing you the difficulty of developing a full GUI application. I suspect that it will fall short of your users' expectations, and still be more difficult than you expect. I recommend that you either replace the Tk with a prompt module (e.g.
IO::Prompt::Hooked) or you commit to a full GUI application.