There is a base with columns: date, name, progress, quality. It is necessary to make a visual presentation, for this I do a selection with sorting by date and create a hash of multidimensional arrays - push @{$data{'name'}[$day]}, "$progress/rating";

I can not generate a full table. If you specify clearly for each array, it works:

 print table( Tr( td('name'), td(@{$data{'name'}}[1]), ), ); 

but you need to show all the arrays, something like [0 .. @{$data{'name'}}]

  • Do you have any other columns besides {name}? Maybe it would be worth keeping the data in the form of $data[$day]{name} . And this table is from which module. I see something very similar in CGI.pm though it’s customary to do there via a CGI instance and then it looks like print $q->table you don’t see the same instance ... - Mike
  • You can also construct a table, say via HTML::Table , add the lines there yourself (and you can do it right in the reading loop from the database, so as not to generate multidimensional structures in memory at all) - Mike
  • yes, this is CGI.pm and it works via print too =) - YarNik
  • one
    What does it mean incorrectly works? Such a construction as you wrote should produce one row of the table in which there will be many columns in each of which data for one day - Mike
  • one
    <td/> is the same as <td></td> - i.e. empty column - Mike

0