First commit of partial RosettaCode contents.
Pushing this for testing purposes. Lots of work still needed.
This commit is contained in:
commit
1e05ecd7ee
781 changed files with 9080 additions and 0 deletions
1
Task/FizzBuzz/Perl/fizzbuzz-2.pl
Normal file
1
Task/FizzBuzz/Perl/fizzbuzz-2.pl
Normal file
|
|
@ -0,0 +1 @@
|
|||
print 'Fizz'x!($_ % 3) . 'Buzz'x!($_ % 5) || $_, "\n" for 1 .. 100;
|
||||
1
Task/FizzBuzz/Perl/fizzbuzz-3.pl
Normal file
1
Task/FizzBuzz/Perl/fizzbuzz-3.pl
Normal file
|
|
@ -0,0 +1 @@
|
|||
print+(Fizz)[$_%3].(Buzz)[$_%5]||$_,$/for 1..1e2
|
||||
1
Task/FizzBuzz/Perl/fizzbuzz-4.pl
Normal file
1
Task/FizzBuzz/Perl/fizzbuzz-4.pl
Normal file
|
|
@ -0,0 +1 @@
|
|||
map((Fizz)[$_%3].(Buzz)[$_%5]||$_,1..100);
|
||||
14
Task/FizzBuzz/Perl/fizzbuzz.pl
Normal file
14
Task/FizzBuzz/Perl/fizzbuzz.pl
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use feature qw/say/;
|
||||
|
||||
foreach my $i (1 .. 100) {
|
||||
say + (0 == $i % 15) ? "FizzBuzz"
|
||||
: (0 == $i % 3) ? "Fizz"
|
||||
: (0 == $i % 5) ? "Buzz"
|
||||
: $i
|
||||
;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue