in reply to foreach problem

This is happening because the special var $_ is referring to the array element received in a particular for loop. What you really want is an array of 4-element arrays for the buttons. Then you can have a foreach inside another foreach...

foreach my $thesebuttons (@aoa) { my @b = @$thesebuttons; foreach my $thisbutton (@b) { code for printing out this button... } }

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.