Help for this page

Select Code to Download


  1. or download this
    my $pie = 123456789;
    my @pies = ($pie =~ /(\d{3})/g);
    print join("\n", @pies);
    
  2. or download this
    $pie = 123456789;
    my $index = 0;
    while($index < length($pie)) {
      print substr($pie, $index, 3)."\n";
      $index += 3;
    }