in reply to Perl/Tk and anonymous widgets

A more Perlish way of writing that would be
sub aaa { map { my $new_widget = $mw->Frame()->pack(-side=>top); $new_widget->Label(-text=>"Variable")->pack(-side=>left, -padx=> +5, -pady=>5); $new_widget->Entry(-width=>30)->pack(-side=>left, -padx=>5, -pad +y=>5); $mw->update; $new_widget; } 1 .. $entry_amount->get; }
Now the sub returns a list of widgets.

Caution: Contents may have been coded under pressure.