Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Gotanda.pm #1
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Mihyaeru
June 11, 2014
Programming
200
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Gotanda.pm #1
Python使いから見たPerl @ Gotanda.pm #1
Mihyaeru
June 11, 2014
More Decks by Mihyaeru
See All by Mihyaeru
会計 freee バックエンドの今後 / freee backend api
mihyaeru21
8
27k
Railsで実装されている機能のマイクロサービスへの切り離し / split to microservices from rails
mihyaeru21
1
880
WebエンジニアのためのMySQLデータ構造基礎(再) / mysql data structure for web developer 2
mihyaeru21
0
330
WebエンジニアのためのMySQLデータ構造基礎 / mysql data structure for web developer
mihyaeru21
1
740
WebエンジニアのためのMySQL入門 / learning mysql for web developer
mihyaeru21
7
2.7k
入門ReactiveX / about ReactiveX
mihyaeru21
3
510
RxSwiftと愉快な仲間たち / RxSwift with Units
mihyaeru21
4
2.9k
RxSwiftでTwitterの ライブラリを作ってる話 / RxTwift
mihyaeru21
4
800
CrystalでTwitter botを作ってみた / Create a Twitter bot in Crystal
mihyaeru21
0
1.4k
Other Decks in Programming
See All in Programming
技術的負債の返済は、AI時代の複利で効く投資 — 経営としての意思決定とその遂行
curekoshimizu
0
1.3k
モジュールの視点からSwiftを読み解く #iosdc
s_shimotori
0
170
AIを上手に使っていこうとしたら越境せざるを得なくなった話 〜実践1年で見えた境界を越えなければならない理由と進め方〜 / Crossing borders with AI
tomoyakitaura
4
1.2k
wkhtmltopdfの次どうするか問題2026
willnet
1
100
cdk deploy JawsSonic #MARATHONしながらAWSリソースをデプロイしてみよう
akihisaikeda
2
130
iOSDC2026登壇資料.pdf
riofujimon
0
160
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
380
Starting & Sustaining Code-Based E2E Testing for Non-Coding QA Teams( #jasstniigata )
teyamagu
PRO
1
200
Java 27新機能 / Java 27 new features
kishida
2
140
個人開発基盤をまるごとCloudflareに引っ越して爆速で総合的体験を向上させた話
tinykitten
0
190
AHC070解法紹介
eijirou
0
120
LL言語やWebフレームワークのPostgreSQL対応 〜DBの機能がユーザーに届くまで〜
kentaroutakeda
1
150
Featured
See All Featured
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.7k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.6k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
240
Building the Perfect Custom Keyboard
takai
2
870
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.4k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
830
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
540
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.6k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.8k
The browser strikes back
jonoalderson
0
1.7k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.2k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
2
2.1k
Transcript
1ZUIPO͍͔Βݟͨ1FSM (PUBOEBQN !NJIZBFSV
ࣗݾհ w ϛώϟΤϧ!NJIZBFSV w 1ZUIPO 0CKFDUJWF$ śƂŠƃٙ 1FSM w
ΏͱΓ7JNNFS w ζϰΟζμʔઓಆһ
Α͘--ͬͯҰׅΓʹ͞ΕΔ͠ 1ZUIPOΘ͔Ε༨༟Ͱ͠ΐ
ͭ1FSM
sub say_hello { my $name = shift; ! print "Hello,
$name\n"; }
͋ΕͬʁҾʁ TIJGUͬͯͳΜͶΜ
sub sum_numbers { my $sum; for (@_) { $sum +=
$_; } ! return $sum; }
Μͬʁ
$_ @_
@_ͱ͔$_ͱ͔Ͳ͔͜ΒདྷͨΜ ͳΜ͡Ό͍͜ΓΌʔʂ
࠷ॳʹࢥͬͨෆຬ w มͳه߸ଟͯ͘ҙຯෆ໌ w ίϯςΩετʁʁʁ w ຖճNZͬͯॻ͘ͷ໘͍͘͞ w ਅِΣʜʜ w
ϦϑΝϨϯεपΓ͕Θ͔Γʹ͍͘ w ҾϦετͲ͜ʂʁ ʜଞʹ͔͚͋ͬͨͩͲΕͨ͆
มͳه߸ଟͯ͘ҙຯෆ໌ $_ @_ 1ZUIPOͰ͜ΜͳʹढจΊ͍ͨมग़ͯ͜ͳ͔ͬͨʂ $! $@ ͨͿΜʜ $. $/
͜Μ͖ͯ͢ͱʁʁʁ @a = (0, 1, 2) Ϧετ ίϯςΩετ 0, 1,
2 εΧϥʔ ίϯςΩετ 3 ཁૉ͕Γ͔ͨͬͨΒlen()ͱ͔໌ࣔతʹॻ͖͍ͨ ॴʹΑͬͯҙຯ͢Δͱ͜Ζ͕ҧ͏ʜʜͩͱʜʜ
NZࢯ w --ͬͯݴΘΕΔ͘Β͍ͩ͠ɺϥΠτʹॻ͖͍ͨ w 1ZUIPOͰम০ࢠͳ͠ͰϩʔΧϧม
ਅِΣʜʜ w ਅِΛද͢໌֬ͳ͕ͭͳ͍ w 5SVF 'BMTFཉ͍ͬ͢͠ w ίϯςΩετ૬·ͬͯѻ͍͕͍͠
ϦϑΝϨϯε w ࠷ॳɺ ͱ<>ಉͩ͡ͱࢥ͍ͬͯͨ w εΧϥʔมͳͷʹྻʂ w 1ZUIPOͰྻͱݴͬͨΒ͜Ε͚ͩ @a =
(0, 1, 2); $ref = \@a; $ref = [0, 1, 2]; a = [0, 1, 2]
ͳΜͰҾϦετͳ͍ͷ w !@Λड͚ͱΔ͚Ͳ͍ํࣗ༝͗͢ w 1ZUIPOͩͱؔͷσϑΥϧτΛઃఆͰ͖Δ͠ ΩʔϫʔυͰݺͿ͜ͱग़དྷΔʂ my ($a, $b) =
@_; my $a = shift; my %args = @_;
ͪͳΈʹ w σϑΥϧτΛͬͨݺͼग़͠ w ී௨ͷݺͼग़͠ w Ωʔϫʔυݺͼग़͠ def hello(name =
'mihyaeru'): print 'Hello, %s' % name ! hello() hello('dareka') hello(name = 'anata')
ෆຬΛ๊͖ͭͭ ϲ݄͕ܦա
࠷ॳʹࢥͬͨෆຬ w มͳه߸ଟͯ͘ҙຯෆ໌ w ίϯςΩετʁʁʁ w ຖճNZͬͯॻ͘ͷ໘͍͘͞ w ਅِΣʜʜ w
ϦϑΝϨϯεपΓ͕Θ͔Γʹ͍͘ w ҾϦετͲ͜ʂʁ
࠷ॳʹࢥͬͨෆຬࠓ w มͳه߸ଟͯ͘ҙຯෆ໌ w ίϯςΩετʁʁʁ w ຖճNZͬͯॻ͘ͷ໘͍͘͞ w ਅِΣʜʜ w
ϦϑΝϨϯεपΓ͕Θ͔Γʹ͍͘ w ҾϦετͲ͜ʂʁ ׳ΕΕා͘ͳ͍ʂ ׳ΕΕʢ͈́ ॻ͍ͨํ͕҆৺ײ͋Δ ਅِΣʜʜ Ҿʹ໊લͳ͘୯ͳΔϦετ ະͩʹͬ͘͠Γ͜ͳ͍
ෆຬ͔Γݴͬͯ ΞϨͳͷͰ
ؾʹೖ͍ͬͯΔͱ͜Ζ w ແ໊͕͍͍ؔ͢ w NBQͱ͔HSFQͷײ͕͖͡ w ϝιουݺͼग़࣌͠ͷୈҰҾʹTFMG͕ೖͬͯ͘Δ
ແ໊͕͍͍ؔ͢ w 1ZUIPOʹMBNCEBͱ͍͏ແ໊ؔΛ࡞Δه๏ΞϦ w ࣜΛ͔ͭ͠ೖΕΒΕͳ͍͔Βจͷॲཧμϝ hoge_call(sub { # do #
something # hoge }); def temp(): # do # something # hoge ! hoge_call(temp) 1FSM 1ZUIPO
NBQͱ͔HSFQ͕ྑ͍ײ͡ ҾΛح͚ͩʹߜΓࠐΜͰɺɺɺ ͨ͠ͷྻʹ͢Δɺɺɺ తͳॲཧ my @squared_odds = map { $_
* $_ } grep { $_ % 2 == 1 } @_;
1ZUIPOͩͱ [x * x for x in nums if x
% 2 == 1]
1ZUIPOͩͱ [x * x for x in nums if x
% 2 == 1] NBQʹ૬ HSFQʹ૬
Ϧετแදه [x * x for x in X if x
% 2 == 1] {x2 | x ∈ X, x % 2 = 1} ֶͷू߹ʹ͓͚Δแతදه͕ݩʹͳ͍ͬͯΔ
ϝιουͷTFMG 1ZUIPOΛኲኵͱͤͯۙ͞ײ͋Γ sub method { my ($self, $hoge) = @_;
} def method(self, hoge): pass
ಥ͚ͩͲ ͦΜͳ͜ΜͳͰ
·ͱΊ w 1FSM͍࢝Ίͯϲ݄ͷਓͷײ w ֖Λ͚͋ͯΈΔͱṖ͍ͱ͜Ζ͕ଟʑ w ͋Δఔ׳ΕͰͳΜͱ͔ͳΔʂ w 1FSMා͔͚ͬͨͲࠓͰ͖ͳͱ͜Ζ͋Δʂʂ