in reply to Table Problem

Here is one idea
#!/usr/bin/perl -w use Tk; use Tk::Table; use strict; #I have an array {phone,mail,name} any idea how #can i put them in a table (in one row) ? #fill your list with AoA data somehow # you can also use a hash my @list = ( [12235673456, 'z@x.com' , 'ZZ Top'], [13456782345, 'b@j.net', 'The Boss'], [19873459789, 'me@where.com', 'You Know Hu'], [12235673454, 'y@x.com' , 'ZY Top'], [13456782346, 'bu@j.net', 'The Bus'], [19873459781, 'you@where.com', 'Yu Know Hu'] ); # get number of rows my $rows = scalar @list; print "$rows\n"; my $mw = MainWindow->new; $mw->geometry("475x125"); $mw->resizable(0,0); $mw->title("Table Example"); # best to put Table into a scrolled Pane my $table_frame = $mw->Frame() ->pack(-expand=>1, -fill=>'both'); my $table = $table_frame->Table(-columns => 3, -rows => $rows, -fixedrows => 1, -scrollbars => 'w', -relief => 'raised'); my $rowcount = 1; foreach my $col qw(Number Email Name){ my $tmp_label = $table->Label(-text => $col,-width=> 20, -relief =>' +raised'); $table->put(0, $rowcount, $tmp_label); $rowcount++; } $rowcount = 1; foreach my $row_ref (@list){ foreach my $col (1 .. 3){ my $tmp_label = $table->Label(-text => $row_ref->[$col -1], -padx => 2, -anchor => 'w', -background => 'white', -relief => "groove"); $table->put($rowcount, $col, $tmp_label); } $rowcount++; } $table->pack(-expand=>1, -fill=>'x'); my $button_frame = $mw->Frame( -borderwidth => 4 )->pack(); $button_frame->Button(-text => "Exit", -command => sub {exit})->pack() +; MainLoop;

I'm not really a human, but I play one on earth Remember How Lucky You Are