Skip to content

Instantly share code, notes, and snippets.

View louiee's full-sized avatar

Louie Octo louiee

View GitHub Profile
@louiee
louiee / fizzbuzz.pl
Last active August 27, 2021 08:58
perl 勉強3時間くらいでつくったやつ。べたべたのif文使っておるです
#!/usr/bin/perl
# 2014/06/19 fizzbuzz
use strict;
use warnings;
my $count;
for ($count = 1; $count < 100; $count++) {
@louiee
louiee / HowOldAreYou.perl
Last active August 29, 2015 14:03
perl勉強 Chapter03?
#!/usr/bin/perl
#2014/06/27 HowOldAreYou
use strict;
use warnings;
use 5.010;
my $name;
my $age;
@louiee
louiee / OddNumber.perl
Last active August 29, 2015 14:03
奇数・偶数判断スクリプト
#!/usr/bin/perl
#2014/07/4 OddNumber EvenNumber
use strict;
use warnings;
use 5.010;
my $i;
@louiee
louiee / algo01.perl
Created July 5, 2014 14:04
なんか謎の課題その1_条件分岐と永久ループ
#!/usr/bin/perl
=head1 algo01.pl
第1回 条件分岐と永久ループ http://codezine.jp/article/detail/1426
1.コマンドラインに入力を待ち受けるための「>」を表示する。
2.標準入力された値があればそのまま表示、値がなければ「未入力です」と表示して、再び入力待ち受け状態にする。
3.「EXIT」が入力された時点でプログラムを終了する。
=cut
@louiee
louiee / time.perl
Created July 6, 2014 13:09
localtimeの使い方
#!/usr/bin/perl
use strict;
use warnings;
use 5.010;
say localtime();
my ($sec,$min,$hour) = localtime();
say "$hour 時 $min 分 $sec 秒";
@louiee
louiee / alogo02.perl
Last active August 29, 2015 14:03
なんか謎の課題その2_条件分岐(複合条件)
#!/usr/bin/perl
=head1 algo02.pl
第1回 第2回 条件分岐(複合条件) http://codezine.jp/article/detail/1495
1. コマンドラインに「今日は何月何日でしょう?」のメッセージを表示する。
2. それぞれ、「何月? ==> 」「何日? ==> 」を表示して入力を受け取る。
3. 入力された月日が今日であれば「正解!!」、間違っていれば「間違っています」と表示する。
=cut
@louiee
louiee / g.perl
Created July 11, 2014 02:31
Gitを複数行打つのがなんぎになってつくったスクリプト 引数でCommitのコメントをかく。普通はshなんかで書くのが妥当だとおもわれる・・・
#! /usr/bin/perl
#引数バージョン ver 0.9
use strict;
use warnings;
my $msg = $ARGV[0];
my @gitadd =`git add -A`;
my @gitcommit =`git commit -m $msg`;
my @gitpush = `git push`;
@louiee
louiee / paiza1.pl
Created December 9, 2014 02:38
POH4 課題1
#!/usr/bin/perl
# 自分の得意な言語で
# Let's チャレンジ!!
use strict;
use warnings;
use v5.10;
my $max;
my $input_lines;
@louiee
louiee / paiza2.pl
Created December 9, 2014 02:41
POH4 課題2
#!/usr/bin/perl
# 自分の得意な言語で
# Let's チャレンジ!!
use strict;
use warnings;
use v5.10;
my $max;
my $i;
@louiee
louiee / paiza3_1.pl
Last active August 29, 2015 14:11
POH4 課題3
#! /usr/bin/perl
#2014/12/09 尺取り虫とか累積和とかよーわからんのじゃー
use strict;
use warnings;
use v5.10;
use List::Util qw/ max /;
my $i;
my @input_lines;