- if ($i == ($column_count - 1)) {
- $formatstring .= "| %-${cutoff}s |\n";
- $borderstring .= "+-" . ('-' x $cutoff) . "-+\n";
+ if ($i == 0 && ($column_count == 1)) {
+ if ($utf8) {
+ $formatstring .= "│ %-${cutoff}s │\n";
+ $borderstring_t .= "┌─" . ('─' x $cutoff) . "─┐\n";
+ $borderstring_m .= "├─" . ('─' x $cutoff) . "─┤\n";
+ $borderstring_b .= "└─" . ('─' x $cutoff) . "─┘\n";
+ } else {
+ $formatstring .= "| %-${cutoff}s |\n";
+ $borderstring_m .= "+-" . ('-' x $cutoff) . "-+\n";
+ }
+ } elsif ($i == 0) {
+ if ($utf8) {
+ $formatstring .= "│ %-${cutoff}s ";
+ $borderstring_t .= "┌─" . ('─' x $cutoff) . '─';
+ $borderstring_m .= "├─" . ('─' x $cutoff) . '─';
+ $borderstring_b .= "└─" . ('─' x $cutoff) . '─';
+ } else {
+ $formatstring .= "| %-${cutoff}s ";
+ $borderstring_m .= "+-" . ('-' x $cutoff) . '-';
+ }
+ } elsif ($i == ($column_count - 1)) {
+ if ($utf8) {
+ $formatstring .= "│ %-${cutoff}s │\n";
+ $borderstring_t .= "┬─" . ('─' x $cutoff) . "─┐\n";
+ $borderstring_m .= "┼─" . ('─' x $cutoff) . "─┤\n";
+ $borderstring_b .= "┴─" . ('─' x $cutoff) . "─┘\n";
+ } else {
+ $formatstring .= "| %-${cutoff}s |\n";
+ $borderstring_m .= "+-" . ('-' x $cutoff) . "-+\n";
+ }