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 strict; | |
use warnings; | |
use Data::Dumper; | |
use Net::Amazon::AWSSign; | |
use XML::XPath; | |
use XML::XPath::XMLParser; |
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 | |
my $start = time; | |
system { $ARGV[0] } @ARGV; # See the Security chapter! | |
my $end = time; | |
printf "The whole time was %d seconds\n", $end - $start; |
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
non forking | |
path-tiny.pl: 15 lines, 217 characters. | |
mango@the-perl-review[~]$ perl5.10.1 path-tiny.pl dp-dump.mysql | |
Rate b h j i a l k g f d e c | |
b 1137/s -- -7% -11% -11% -11% -11% -12% -12% -12% -12% -13% -13% | |
h 1218/s 7% -- -4% -4% -5% -5% -5% -5% -5% -6% -6% -6% | |
j 1273/s 12% 4% -- 0% -1% -1% -1% -1% -1% -2% -2% -2% | |
i 1273/s 12% 4% 0% -- -1% -1% -1% -1% -1% -2% -2% -2% |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- OPML generated by NetNewsWire --> | |
<opml version="1.1"> | |
<head> | |
<title>mySubscriptions</title> | |
</head> | |
<body> | |
<outline text="Questions tagged perl - Stack Overflow" description="" title="Questions tagged perl - Stack Overflow" type="rss" version="RSS" htmlUrl="http://stackoverflow.com/questions/tagged/?tagnames=perl&amp;sort=active" xmlUrl="http://stackoverflow.com/feeds/tag/perl"/> | |
<outline text="perl.modules" description="" title="perl.modules" type="rss" version="RSS" htmlUrl="http://www.nntp.perl.org/group/perl.modules/" xmlUrl="http://www.nntp.perl.org/rss/perl.modules.rdf"/> | |
<outline text="Perl" description="" title="Perl" type="rss" version="RSS" htmlUrl="http://www.reddit.com/r/perl/" xmlUrl="http://www.reddit.com/r/perl/.rss"/> |
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 v5.10; | |
use File::Find qw(find); | |
use File::MMagic; | |
my $MM = File::MMagic->new; | |
my $files = []; | |
say "ARGV [@ARGV]"; | |
find( generator( $files ), @ARGV ); |
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 Digest::SHA; | |
use Digest::MD5; | |
use File::Find; | |
use File::Spec::Functions qw(no_upwards canonpath); | |
DIR: foreach my $dir ( @INC ) { | |
next if $dir =~ /\A\.\.?\Z/; | |
my( $wanted, $files ) = find_regular_files(); |
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 v5.10; | |
use Email::MIME; | |
use File::Basename; | |
my $message = do { local $/; <> }; | |
my $parsed = Email::MIME->new( $message ); | |
my $count = 1; | |
foreach my $part ( $parsed->parts ) { |
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 v5.14; | |
my $file = $ARGV[0]; | |
my $parser = Pod::TestLinks->new; | |
$parser->parse_file( $file ); | |
package Pod::TestLinks 0.14 {; | |
use strict; | |
use base 'Pod::PseudoPod'; |
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.10; | |
use utf8; | |
binmode STDOUT, ':encoding(UTF-8)'; | |
binmode STDERR, ':encoding(UTF-8)'; | |
use File::Basename qw(dirname); | |
use File::Spec::Functions qw(catfile); |
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
#!perl | |
use v5.14; | |
use strict; | |
use Module::Extract::Namespaces; | |
LINE: while( <> ) { | |
chomp; | |
my @namespaces = Module::Extract::Namespaces->from_file($_); | |
if( @namespaces == 1 ) { |