in reply to Creating variables for each array member

Use an array:

use warnings; use strict; use Tk; my $main = MainWindow->new (-title => "ButtonDemo"); my @buttons; push @buttons, $main->Button (-text => "Button $_") for 1..10; $_->pack () for @buttons; MainLoop ();

DWIM is Perl's answer to Gödel