# If you don't add 1 to the result of the division below, # you will get an additional column. my $splicer = (scalar(@list) / $columns) + 1;