print join "\n",
map { $t = $_ ;
join("\t", $_."\t",
map { $data{$_,$t} ? "X" : " " } @days
)
} @time;
This code differs from yours in several regards:
- no redundant use of topicalizing single-scalar for to print
- the time as first tab-separated item of the inner join
- for each time an own line
To me this looks like misusing map. Better use it solely to calculate results of values from a list by one or very few statements and no nested map, and putting the results into a new list or array at the same time.