-
- if ($sameblock and $sameblock ne $block and $block ne 'No_Block') {
- say sprintf '<tbody><tr><th colspan=%d>%s', $pagecols+1, $block;
- undef $sameblock;
- }
-
- if (not $sameblock) {
+ if ($block ne (state $sameblock = $block) and $block ne 'No_Block') {
+ print '<tbody>';
+ printf '<tr><th colspan=%d>%s', $pagecols+1, $block
+ unless $block eq 'No_Block';
+ say '';