Eradicatore has asked for the wisdom of the Perl Monks concerning the following question:
#!/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; }
#!/usr/local/bin/perl -w use IPC::Open2; $| = 1; while ($line = <STDIN>) { last if ($line =~ /die/i); #print "child_got_this:$line"; chomp $line; open TTT, ">$line"; print TTT "file is $line\n"; close TTT; } exit;
Justin Eltoft
"If at all god's gaze upon us falls, its with a mischievous grin, look at him" -- Dave Matthews
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Perl2exe bug??
by EvanK (Chaplain) on Sep 27, 2001 at 08:45 UTC | |
Re: Perl2exe bug??
by Eradicatore (Monk) on Sep 28, 2001 at 05:23 UTC | |
Re: Perl2exe bug??
by MZSanford (Curate) on Sep 27, 2001 at 15:47 UTC |