#!/usr/local/bin/perl -w print "got here!\n"; use Tk; use IPC::Open2; $| = 1; ###open2(\*IN, \*OUT, "$^X f2.pl"); open2(\*IN, \*OUT, "f2.exe"); my $mw = new MainWindow; $mw->Label(-text => 'Print file')->pack; my $font = $mw->Entry(-width => 10); $font->pack; my $filename = $mw->Entry(-width => 10); $filename->pack; $mw->Button(-text => 'make test1 file', -command => sub{print OUT "test1.txt\n";} )->pack; $mw->Button(-text => 'make test2 file', -command => sub{print OUT "test2.txt\n";} )->pack; $mw->Button(-text => 'Exit', -command => \&my_exit )->pack; MainLoop; sub my_exit { print OUT "die\n"; close IN; close OUT; exit; }