perl -E"say '.' x rand(80) . '# test comment' for 1..3" ......................# test comment .................................# test comment ..........................................................................# test comment #### perl -E"say '.' x rand(80) . '# test comment' for 1..10" |perl -lpe " /\s*#(.*)$|$/ && ( substr( $_, $-[0], length($_) ) = qq{ }x(68 - $-[0] + 2) . qq{ #$1} ) ............................................... # test comment .......................................................... # test comment ....................................... # test comment ............................................................ # test comment .......................................................................... # test comment ...... # test comment ........................................ # test comment ............................... # test comment ................................................... # test comment ................................... # test comment