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 5.010; | |
use strict; | |
use warnings; | |
use Net::Twitter; | |
use URI::Find; | |
use Web::Scraper; | |
use LWP::UserAgent; | |
use YAML; |
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 utf8; | |
use File::Basename; | |
for my $argv (@ARGV){ | |
my $file_name = basename($argv,'.txt'); | |
open my $fh_in, "<:encoding(shiftjis)", $argv or die "$argv : $!"; |
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
"use strict"; | |
var FuncFlatten = function () { | |
var codeList = [].slice.apply(arguments); | |
return { | |
add: function () { | |
[].push.apply( codeList, [].slice.apply(arguments) ); | |
}, | |
run: function () { | |
var runner = new FuncFlattenRunner(); |
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 Data::Dumper; | |
my $strobj = MyURI::http->new({ str => 'http://hoge/'}); | |
warn Dumper $strobj; | |
warn $strobj; | |
package MyURI { | |
use overload ( |
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
use strict; | |
use warnings; | |
use Data::Dumper; | |
my @banner_size = ({ | |
width => 320, | |
height => 50, | |
}); | |
my $is_existing_size; |
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
#!/bin/sh | |
# 前提条件 | |
# 1.fontforgeとx11をインストール済み | |
# sudo port install fontforge | |
# x11 http://xquartz.macosforge.org/landing/ | |
# | |
# 2.同一ディレクトリにRicty-***. |
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 feature 'say'; | |
use bigint lib => 'GMP'; | |
use Test::More; | |
subtest 'Project Euler - Problem 3' => sub { | |
my $n = 6008514751430000000000000000000000000000000000000000000000000000; |
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 Test::More; | |
my $str = 'foo Foo FOO'; | |
$str =~ s{(foo)}{ my $len = scalar split(/[A-Z]/,$1); ( $len == 0 ) ? 'BAR' : ( $len == 1 ) ? 'bar' : 'Bar' }ieg; | |
is($str, 'bar Bar BAR'); |
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 Text::Xslate; | |
use IO::All; | |
my $tx = Text::Xslate->new( | |
syntax => 'TTerse', | |
verbose => 2, |
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 IPC::Run qw/ timeout /; | |
IPC::Run::run( | |
['cat', 'sample.txt'], | |
\my $in, | |
\my $out, | |
\my $err, |
OlderNewer