use strict; use Tk; use Tk::Button; use Tk::Checkbutton; use Tk::LabEntry; use Tk::Label; my $cmdLineText; my $mw=MainWindow->new(-title=>'Foo Installer'); my $row = 0; my $w_install = $mw-> Button ( -overrelief=>'raised', -relief=>'raised', -text=>'Install', -command=>\&installItems) -> grid(-column=>0, -row=>++$row, -columnspan=>3, -sticky=>'nsew'); my $w_cmdWindow = $mw->Label (-height=>7, -foreground=>'white', -background=>'black', -text => $cmdLineText)->grid(-column=>0, -row=>++$row, -columnspan=>3, -rowspan=>10, -sticky=>'nsew'); MainLoop; sub installItems { open (FILE, "dir 2>&1 |"); #appears to do nothing $cmdLineText = ""; while () { chomp; $cmdLineText .= $_; } close(FILE); #$cmdLineText = `dir`; #appears to do nothing #system "dir"; #outputs to original screen }