in reply to (golf) Triangle of numbers
for(1..$a){printf"%${\length($a*$a/2)}d",$-++;$_==++$?||redo;print$/;$ +?=0} [download]