#!/usr/bin/perl
use strict;
use warnings;
my ($first, $last) = (2, 99);
my $n = $first;
while ($n < $last){
  print " $n \n" unless (1x$n) =~ /^(11+?)\1+$/;
  $n++;
}
