This file contains hidden or 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
Introduction | |
Why Perl over Powershell? | |
This isn't Learning Perl on Win32 | |
Perl distributions for Windows | |
ActivePerl | |
Strawberry Perl | |
Cava | |
cygwin (only briefly) |
This file contains hidden or 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/perl | |
use v5.14; | |
use Mojo::UserAgent; | |
my $ua = Mojo::UserAgent->new->max_redirects(5); | |
my $user = $ENV{GITHUB_USER} // '...'; | |
my @committer_names = ( '...', '...', ); | |
$ENV{OHLOH_USER} //= '...'; |
This file contains hidden or 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/local/perls/perl-5.14.2/bin/perl | |
use v5.14; | |
use Mojo::UserAgent; | |
my $ua = Mojo::UserAgent->new; | |
my $url = 'http://www.toonarific.com/show_episodes.php?show_id=2177'; | |
my @seasons = $ua->get( $url ) | |
->res |
This file contains hidden or 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
BuiltinFunctions::ProhibitBooleanGrep | |
BuiltinFunctions::ProhibitStringyEval | |
BuiltinFunctions::ProhibitStringySplit | |
BuiltinFunctions::ProhibitUniversalCan | |
BuiltinFunctions::ProhibitUniversalIsa | |
ClassHierarchies::ProhibitExplicitISA | |
ControlStructures::ProhibitMutatingListFunctions | |
ControlStructures::ProhibitUnreachableCode | |
ErrorHandling::RequireCarping | |
InputOutput::ProhibitBarewordFileHandles |
This file contains hidden or 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
[ | |
{ | |
"priority" : "P4", | |
"name" : "Canonicalize path names before validating them", | |
"rule" : "", | |
"section" : "1", | |
"recommedation" : "1", | |
"level" : "L3", | |
"url" : "https://www.securecoding.cert.org/confluence/display/perl/IDS00-PL.+Canonicalize+path+names+before+validating+them", | |
"class" : "IDS00-PL", |
This file contains hidden or 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
use Net::Twitter; | |
use v5.10; | |
# get your own credentials at https://dev.twitter.com/apps/new | |
my $nt = Net::Twitter->new( | |
traits => [qw/OAuth API::REST/], | |
map { $_ => $ENV{"twitter_$_"} || die "ENV twitter_$_ not set" } | |
qw( | |
consumer_secret | |
consumer_key |
This file contains hidden or 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
God, give me privileges to change with serenity | |
the things that cannot be changed, | |
Permission to change the things | |
which should be changed, | |
and the Wisdom to distinguish | |
the lusers from the users. | |
Configuring several servers at a time, | |
Fixing multiple issues at a time, | |
Accepting hardware as a pathway to Perl, | |
Getting, as Stallman did, |
This file contains hidden or 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
#!/Users/brian/bin/perls/perl5.14.2 | |
use v5.14; | |
use Email::MIME; | |
use Date::Parse qw(str2time); | |
# /Users/brian/Library/Mail/V2/[email protected]/Pinto Campaign.mbox/52D05AC0-3807-4D78-9864-069A09964592/Data/6/0/4/2/Messages | |
# I'm grabbing the messages out of Apple's Mail, which is fine I guess. | |
# I have a filter set up for the messages I want. | |
# If I really wanted something fancy, I'd pull out procmail. | |
my $folder = $ARGV[0] // q(messages); |
This file contains hidden or 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/local/perls/perl-5.14.2/bin/perl | |
use Mac::Pasteboard; | |
my $pb = Mac::Pasteboard->new; | |
my %tags = $pb->flavor_tags; | |
my @names = $pb->flavor_flag_names ($flags); | |
use Data::Dumper; |
This file contains hidden or 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 perl5.14.2 | |
# retweeter.pl | |
# https://gist.github.com/briandfoy/5478591 | |
use Net::Twitter; | |
use v5.10; | |
die "Specify the original tweet id!\n" unless defined $ARGV[0]; | |
# get your own credentials at https://dev.twitter.com/apps/new | |
my $nt = Net::Twitter->new( |