#!/usr/bin/perl

# Generate an ascii art honeycomb
# I am so sorry.
# polprog.net 2019

use warnings;
use strict;

sub  trim { my $s = shift; $s =~ s/^\s+|\s+$//g; return $s };
sub  spaces { my $s = shift; return (length(trim($s)) - 2); };


my $line="\\__/  ";
my $top = "__    ";
my $horiz = 13;
my $vert = 7;


print " " x (length trim $line) . $top x $horiz . "\n";
for(my $i = 0; $i < $vert;  $i++){
    print $line x $horiz . "\\\n";
    print "/" . ((((" " x (spaces $line)) . trim $line) x $horiz) . "\n");

}
