in reply to Re^2: Creating variables for each array member
in thread Creating variables for each array member

Right. Another minor point I would make, which almost every new "hash-stuffer" runs into, is avoiding the error "can't use a hash ref as a key".

So for instance in

for $i ( @array ) { $buttonhash{$i} = $mw->Button( -text => "Button $i", -command => [\&printme, $i], )->pack(); }

It would be better to write it as

$buttonhash{$i}{'object'} = $mw->Button(....)
that way, you can stuff the hash with other data, like
$buttonhash{$i}{'button_text'} = 'foobar'

I'm not really a human, but I play one on earth. Cogito ergo sum a bum