in reply to arrange columns
This line:
print " " x ($lenght_date), $count{$_}->{$date[$i]};
Should be using printf, i.e. something like:
printf "%${lenght_date}s ", $count{$_}->{$date[$i]};
Similarly,
print map { sprintf "%7d", $_ } @tasks;
Should be written as:
print map { sprintf "%${lenght_date}s " } @tasks;
In other words, use the same formatting technique, with the same widths, for every row of the output.
|
|---|