lil_v has asked for the wisdom of the Perl Monks concerning the following question:
When I run in this in perl, it works fine. However, in perl Tk, the system argument "$title" can't be read. The program freezes and when I stop the debugger, the executable file is opened but the argument is not passed. Is there any other way to go about this problem or can I write this in a different way? Any help would be appreciated, thanks in advance!my $title = "something"; my $executable = "C:/Users/Desktop/file.exe"; my $output = "C:/Users/Desktop"; my $outfile = "C:/Users/Desktop/$title.in"; open(OUTFILE,">$outfile") or die "Can't open output file $outfile\ +n"; print OUTFILE @array; close OUTFILE; my $msg = $mw->messageBox(-icon => "info", -type => "OK", -title => 'Save', -message => "File was +successfully saved."); chdir $output; system("$executable","$title",) == 0 or die "system $executable failed: $?";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Tk - system()
by zentara (Cardinal) on Aug 06, 2008 at 17:02 UTC | |
by lil_v (Sexton) on Aug 06, 2008 at 17:25 UTC | |
by lil_v (Sexton) on Aug 06, 2008 at 18:23 UTC | |
by zentara (Cardinal) on Aug 06, 2008 at 19:46 UTC | |
by lil_v (Sexton) on Aug 06, 2008 at 20:32 UTC | |
|