# こうですよ
for $num (1..3){
  $_ = '1' x $num;
  print /[0-9]{@{[$num+1]}}/ ? 'ok,' : 'not ok,';
  $_ = '1' x ($num + 1);
  print /[0-9]{@{[$num+1]}}/ ? 'ok,' : 'not ok,';
  $_ = '1' x ($num + 2);
  print /[0-9]{@{[$num+1]}}/ ? 'ok,' : 'not ok,';
  print "\n";
}