Ok.. To create just one button we write:

use Tk;
use strict;
my $mw = MainWindow->new;
my $b1 = $mw->Button->pack;
MainLoop;

but to create a hundred buttons, we cant keep writing... So, i used
the following:
for(my $i=1;$i<=100;$i++){
my $bt='b'.$i;
$$bt=$mw->Button->pack;
}

but the above gives error 'Cant use scalar ref while strict refs in
use' or something like that.. What can i do?

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


Reply via email to