This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use Carp qw(cluck); | |
use autodie ':all'; | |
use Getopt::Long 2.33 qw(:config auto_help); | |
use File::Find::Rule; | |
use File::Basename 'basename'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this is for Perl v5.10.1 | |
# | |
($$$$$) | |
msgrcv | |
($$$$) | |
semctl | |
shmread | |
shmwrite |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use Want qw(rreturn); | |
use Test::Resub qw(resub); | |
BEGIN { *CORE::GLOBAL::die = sub { CORE::die(@_) } } | |
use Data::Dumper; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Here's a simple lambda combinator; it'll turn the function passed in | |
// into a function which, when called, returns a recursible copy of itself. | |
function y_combinator(curried) { | |
return function(f1){ | |
return curried(function () { f1(f1)(arguments) }); | |
}(function (f2) { | |
return curried(function () { f2(f2)(arguments) }); | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
sub y_combinator (&) { | |
my $curried = shift; | |
return sub { | |
my $f1 = shift; | |
return $curried->(sub { $f1->($f1)(@_) }); | |
}->(sub { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Makefile.PL b/Makefile.PL | |
index cfc4d6d..8e90634 100644 | |
--- Makefile.PL | |
+++ Makefile.PL | |
@@ -8,5 +8,8 @@ WriteMakefile( | |
NAME => 'lib-with-preamble', | |
VERSION_FROM => 'lib/lib/with/preamble.pm', | |
PM_FILTER => 'perl my/filter', | |
- PREREQ_PM => { 'PerlIO::via::dynamic' => 0.02 }, | |
+ PREREQ_PM => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
{ | |
package maybe; | |
use overload 'bool' => sub { 0 }; | |
sub new { bless \$_[0] } | |
sub DESTROY {} | |
sub AUTOLOAD { shift } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Inhalation of crystalline silica is harmful to the lungs, causing | |
silicosis. Amorphous silica is considered to be low toxicity, but prolonged | |
inhalation cause changes to the lungs.[24] Diatomaceous earth is mostly | |
amorphous silica, but contains some crystalline silica, especially in the | |
saltwater forms.[25] In a study of workers, those exposed to natural DE for | |
over 5 years had no significant lung changes, while 40% of those exposed | |
to the calcined form had developed pneumoconiosis.[26] Today's common | |
D.E. formulations are safer to use as they are predominantly made up of | |
amorphous silica and contain little or no crystalline silica.[27] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use bigrat; | |
my $n = shift || 100; | |
print "$n! = " . tail_factorial($n) . "\n"; |
OlderNewer