Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add perl 6 stuff

  • Loading branch information...
commit 5635ab5d8ef71b7f8f81bec73c05ed506f5a09dc 1 parent 50b8897
@leto authored
View
7 README
@@ -0,0 +1,7 @@
+This is a rapidly developing benchmark suite for perl 5 and perl 6
+solutions to programming problems from http://projecteuler.net/.
+
+File in each directory are named according to:
+
+<3-digit project euler number>.<2-digit implementation number>.pl
+
View
2  perl6/001_01.pl
@@ -0,0 +1,2 @@
+say [+] grep { $_ % 3 == 0 or $_ % 5 == 0}, (1..1000);
+
View
6 perl6/001_02.pl
@@ -0,0 +1,6 @@
+my $s = 0;
+for (1..1000) {
+ $s += $_ if $_ % 3 == 0 or $_ % 5 == 0
+}
+say $s;
+
View
6 perl6/001_03.pl
@@ -0,0 +1,6 @@
+my $s = 0;
+for (1..1000) {
+ $s += $_ if $_ % 3 == 0 || $_ % 5 == 0;
+}
+say $s;
+
View
5 perl6/001_04.pl
@@ -0,0 +1,5 @@
+my $s = 0;
+for (1..1000) {
+ $s += $_ if $_ % 3 == 0 or $_ % 5 == 0
+}
+say $s;
View
6 perl6/001_05.pl
@@ -0,0 +1,6 @@
+my $s = 0;
+$s += $_ for grep { $_ % 3 == 0 or $_ % 5 == 0}, (1..1000);
+say $s;
+
+
+
Please sign in to comment.
Something went wrong with that request. Please try again.