in reply to how to make perl only print whole numbers
perl -le '("1" x shift)=~/^(11+)\1+$(?{print length $1})(*FAIL)/' 30 15 10 6 5 3 2 [download]