As has already been mentioned, your problem is that $open is scoped locally to the sub open_file. This doesn't work, because that way the variable is not accessible outside of the sub (when you click the Get Statistics button).

Here's a minimal version that works in the sense that when you first click "Open" and select a file, and then click "Get Statistics", the latter routine prints the selected file name to the console. And if it can print the file name, it should also be able to do something else with it.

It doesn't work in the sense that the global $open varibale is not initialized and not recognized. In fact your script works fine alone but when i do the same in my script (your simply version) it doesn't print out the name of the file:
"Use of uninitialized value $fastafile in concatenation (.) or string at Desktop/script_perl/MIRNAWdelta.pl line 171.
selected file: " (blank).
Probably the problem is that the windows where are all the buttons considered since now are a new windows (soubbpoutin of a initial Get->start button) I mean: