Commits

Shlomi Fish committed a65ddfc

Concentrate the print in one place.

Comments (0)

Files changed (1)

project-euler/128/euler-128.pl

     {
         for my $cell (0 .. ($ring-1))
         {
-            print "$n ; Neighbours = ", 
 
             my @vicinity;
 
                     # item.
                     push @vicinity, $x, $x+1;
                 }
-
-                print join(",", sort { $a <=> $b } @vicinity);
             }
-            print "\n";
+            print "$n ; Neighbours = ", 
+                join(",", sort { $a <=> $b } @vicinity), 
+                "\n";
             $n++;
         }
     }