2018-01-01から1ヶ月間の記事一覧

並列処理 Parallel::ForkManager @ perl

時間のかかる処理を{}で括って$pm->start and next;と$pm->finish;で待機させる count1は10秒で終わる、count2は5秒で終わる処理を並列処理するサンプル #!/usr/bin/perl use Parallel::ForkManager; my $pm = Parallel::ForkManager->new(2); ## 処理1 { $p…

coincheck-API perl

#!/usr/bin/perl use HTTP::Tiny; use Digest::SHA qw/hmac_sha256_hex/; use strict; my $ACCESS_KEY = ACCESS_KEY; my $SECRET_KEY = SECRET_KEY; my $dt = time*10000; my $url = "https://coincheck.com/api/ticker"; my $signature = hmac_sha256_hex($…