#!/usr/bin/env perl use strict; use warnings; $_ = '1' x 64; s{1}{ my $p=pos()+1; sprintf("%3d",$p).($p%8?'':"\n") }ge; print;