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/perl | |
@array = qw(be | |
bee | |
beef | |
beer | |
beech | |
beach); | |
foreach (@array){ |
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/perl | |
use warnings; | |
use strict; | |
use 5.010; | |
my @inc = (1..100); | |
for (@inc){ | |
if (($_ % 3 == 0) && ($_ % 5 == 0)){ | |
say "FizzBuzz"; |
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/perl | |
use warnings; | |
use strict; | |
use 5.010; | |
my @inc = (1..100); | |
for(@inc){ | |
if(($_ % 3 == "0") && ($_ %5 == "0")){ | |
say "FizzBuzz"; | |
}elsif($_ % 3 == "0"){ |
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/perl | |
#Odd number0 Script 2017/12/01 | |
#0は奇数でも偶数でもない・・・説 | |
use warnings; | |
use strict; | |
use 5.010; | |
for(my $i=0 ; $i<10; $i++){ | |
if($i==0){ |
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/perl | |
#Odd number Script 2017/12/01 | |
#0は奇数でも偶数でもない・・・説 | |
use warnings; | |
use strict; | |
use 5.010; | |
foreach(0..9){ | |
if($_==0){ |
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/perl | |
use 5.010; | |
use List::Util qw/sum/; | |
chomp(my $line = <STDIN>); | |
my @my_card = split(" ", $line); | |
if($my_card[0] == "0"){ | |
say "10"; |
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/perl | |
while(<>){ | |
chomp; | |
if(/パターンをここにかく/){ | |
print "マッチしたやつ:|$`<$&>$'|\n"; | |
} | |
}else{ | |
print "マッチしない:|$_|\n" ; | |
} |
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/perl | |
use strict; | |
my @weight; | |
push @weight, 30 + int(rand(20)) while @weight < 10; | |
print "Weight: @weight\n"; | |
my @work; | |
comb(@weight); |
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/perl | |
use strict; | |
use warnings; | |
use Web::Query; | |
# 出演者リストを取得する | |
sub checkkStars { | |
my $uri = shift; | |
my $res; |
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/perl | |
use utf8; | |
use warnings; | |
use strict; | |
use Encode qw/encode decode/; | |
my $word; | |
while(<>){ | |
$word=decode('UTF-8',$_); | |
if($word=~/[ァ-タダ-ヶ]/){ |