spydermonkey
Programmer
I have a CMD script I'm rebuilding to work into Perl TK. One problem I am having is printing back to the UI itself. I know it has to be done within a label but I can't seem to get variables to print inside of one.<p>
Can someone show me how to make scalars (and other variables) work within a label? The code I have to date is
Thank you!
Can someone show me how to make scalars (and other variables) work within a label? The code I have to date is
Code:
#!/usr/bin/perl
use strict;
use Tk;
my $mw = new MainWindow;
$mw->geometry('150x200');
my $menubar = $mw->Menu;
my $file_menu = $menubar->cascade(-label => "~File");
#$file_menu->command(-label => 'Exit',-command => \&do_this);
my $edit_menu = $menubar->cascade(-label => "~Edit");
my $help_menu = $menubar->cascade(-label => "~Help");
$help_menu->command(-label => 'About..',-command => \&do_this);
$mw->configure(-menu => $menubar);
MainLoop;
my $this = "that";
sub do_this
{
$mw->Label(-text=>\$this)->pack;
}
Thank you!