$frame->DragAcceptFiles(1); EVT_DROP_FILES( $frame, \&doit ); sub doit { #warn "@_\n" open ( our $file, '<', @_ ) or die "$!"; \&otherSub($file); }