$menu->add( 'command', -label => "2nd col", -command => [\&addToTable,'filler',$date, 1, \@tableArray, $table]); $menu->add( 'command', -label => "3rd col", -command => [\&addToTable,'filler',$date, 2, \@tableArray, $table ]);