my $width_col = 8; say join ' | ', map { # Give each column the same size length($_) >= $width_col ? $_ : $_ . " "x($width_col-length($_)) # add spaces } @$_ for @rows;