Skip to content

Commit

Permalink
Add perl 6 stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
leto committed Jul 12, 2009
1 parent 50b8897 commit 5635ab5
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 0 deletions.
7 changes: 7 additions & 0 deletions 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

2 changes: 2 additions & 0 deletions perl6/001_01.pl
@@ -0,0 +1,2 @@
say [+] grep { $_ % 3 == 0 or $_ % 5 == 0}, (1..1000);

6 changes: 6 additions & 0 deletions perl6/001_02.pl
@@ -0,0 +1,6 @@
my $s = 0;
for (1..1000) {
$s += $_ if $_ % 3 == 0 or $_ % 5 == 0
}
say $s;

6 changes: 6 additions & 0 deletions perl6/001_03.pl
@@ -0,0 +1,6 @@
my $s = 0;
for (1..1000) {
$s += $_ if $_ % 3 == 0 || $_ % 5 == 0;
}
say $s;

5 changes: 5 additions & 0 deletions perl6/001_04.pl
@@ -0,0 +1,5 @@
my $s = 0;
for (1..1000) {
$s += $_ if $_ % 3 == 0 or $_ % 5 == 0
}
say $s;
6 changes: 6 additions & 0 deletions perl6/001_05.pl
@@ -0,0 +1,6 @@
my $s = 0;
$s += $_ for grep { $_ % 3 == 0 or $_ % 5 == 0}, (1..1000);
say $s;



0 comments on commit 5635ab5

Please sign in to comment.