Actually, that was just an example to explain my problem. I am facing
this problem when i use Tk. Any subroutine associated with the
-command option of a button widget.

use Tk;
my $mw = MainWindow->new;
my $b = $mw->Button(-text=>'hello',-command=>sub { &welcome })->pack;
my $l = $mw->Label(-text=>'')->pack;
sub welcome {
$l->configure(-text=>'welcome buddy'); }
MainLoop;

in the above example, i have to add a declaration
sub welcome;
before declaring $b, but cant define it.

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to