Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Perl Quiz
Search
Shoichi Kaji
May 21, 2021
Programming
0
130
Perl Quiz
Gotanda.pm 2021/05/21
Shoichi Kaji
May 21, 2021
Tweet
Share
More Decks by Shoichi Kaji
See All by Shoichi Kaji
宿泊予約サイトにおける検索と料金計算の両立
skaji
2
1.6k
昔のGo, 今のGo ~比較, ソート編~
skaji
0
150
cpm at PerlCon 2019
skaji
0
110
Perl5 Package Manager
skaji
0
650
Internal of cpm
skaji
0
570
How to execute external programs in Perl
skaji
3
560
Writing Perl with w0rp/ale
skaji
0
2.2k
nginx unit
skaji
0
44
Perl6 ecosystem
skaji
1
1.4k
Other Decks in Programming
See All in Programming
とにかくAWS GameDay!AWSは世界の共通言語!.pdf / Anyway, AWS GameDay! AWS is the world's lingua franca!
seike460
PRO
0
280
Java ジェネリクス入門 2024
nagise
0
540
プロジェクト新規参入者のリードタイム短縮の観点から見る、品質の高いコードとアーキテクチャを保つメリット
d_endo
1
970
Progressive Web Apps für Desktop und Mobile mit Angular (Hands-on)
christianliebel
PRO
0
100
go.mod、DockerfileやCI設定に分散しがちなGoのバージョンをまとめて管理する / Go Connect #3
arthur1
10
2.3k
現場で役立つモデリング 超入門
masuda220
PRO
12
2.7k
約9000個の自動テストの 時間を50分->10分に短縮 Flakyテストを1%以下に抑えた話
hatsu38
21
9.8k
外部システム連携先が10を超えるシステムでのアーキテクチャ設計・実装事例
kiwasaki
1
180
C#/.NETのこれまでのふりかえり
tomokusaba
1
140
Honoの来た道とこれから
yusukebe
19
3k
Re:proS_案内資料
rect
0
270
讓數據說話:用 Python、Prometheus 和 Grafana 講故事
eddie
0
330
Featured
See All Featured
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.4k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
46
2.1k
How to Ace a Technical Interview
jacobian
275
23k
Facilitating Awesome Meetings
lara
49
6k
Designing Experiences People Love
moore
138
23k
For a Future-Friendly Web
brad_frost
174
9.4k
Fireside Chat
paigeccino
32
3k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
355
29k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.2k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
7.9k
What's new in Ruby 2.0
geeforr
342
31k
The Pragmatic Product Professional
lauravandoore
31
6.3k
Transcript
Perl Quiz😆 Shoichi Kaji
Q1. ࣍ͷจষਖ਼͍͔͠? Time::Localύοέʔδʹ͓͍ͯ timelocalؔͰͳ͘ timelocal_modernؔΛ͏ ͜ͱ͕ਪ͞Ε͍ͯΔɻ
A1. ਖ਼͘͠ͳ͍
• timelocal جຊతʹ localtime ͷ"ٯ"Λఏڙ͢Δؔɻ Y,m,d,H,M,SΛड͚औΓunixtimeΛฦ͢ɻ • ͕ɺ"DWIM"ͳڍಈΛ͢Δ্ؔɺ 2020Λڥʹ݁Ռ͕มΘΔՄೳੑ͕͋Δ😨 •
͜ΕΛղܾ͘͢ɺܾఆతͳ݁ՌΛฦ͢ timelocal_modern͕༻ҙ͞Εͨɻ • ͕ɺͦΕগʑ͍·͍ͪͩͬͨͷͰɺݱࡏͰ timelocal_posixΛ͏͜ͱ͕ਪ͞Ε͍ͯΔɻ ͜Εlocaltimeͷਅͷ"ٯ"Λఏڙ͢Δɻ
Q2. ࣍ͷ ʹೖΔͷԿ͔? ֎෦ίϚϯυͷඪ४ग़ྗΛ ಘΔؔͱͯ͠ qx//, ``, ͕͋Δɻ
A2. readpipe
• rjbs͞ΜͷϒϩάಡΜͰ͍ͯɺ readpipeͱ͍͏͕ؔ͋Δ͜ͱΛ࠷ۙͬͨɻ • ಉ͡ಇ͖Λ͢ΔΈࠐΈ͕ؔ 3ͭ͋Δඞཁ...
Q3. PerlͰϋογϡϦϑΝϨϯεͱ ϒϩοΫʹಉ͡ه߸ {} Λ༻͍͍ͯΔɻ ͳΜΒ͔ͷཧ༝ͰϋογϡϦϑΝϨϯεΛ ໌͍ࣔͨ͠ͱ͖ +{} ͕ଟ༻͞ΕΔɻ ͰٯʹϒϩοΫΛ໌͍ࣔͨ͠ͱ͖
ͳΜͱॻ͘ͱΑ͍͔ʁ
A3. {; }
• metacpanΛோΊ͍ͯͨΒɺ App::UniϞδϡʔϧͰΘΕ͍ͯͯͬͨɻ • ࣮ࡍͷͱ͜Ζɺ+{}, {; } ຊʹඞཁͳॴগ ͳ͍ͱࢥ͏😇
Q4. Perl v5.16Ҏ্ʹ͓͍ͯ ࣮ߦϢʔβͷhomeσΟϨΫτϦ Λऔಘ͢Δ؆ศͳํ๏ʁ
A4. my $home = (<~>)[0];
• ΫϩεϓϥοτϑΥʔϜΛҙ্ࣝͨ͠Ͱ HomeσΟϨΫτϦΛऔಘ͢Δͷ݁ߏେมɻ • ͪΌΜͱΔͳΒFile::HomeDirϞδϡʔϧΛ͏ͷ͕ ΑΖ͍͠ɻ • "͋Δఔ"ͰेͳΒɺάϩϒ(glob,<>)Ͱ "~" Λ
ղܾͤͯ͞औಘ͢Δͷ͕ϥΫɻ • ͳ͓ɺPerl5.16ະຬҙ͍ࣝͨ͠ͳΒ File::HomeDir::TinyΛ͏ͱΑΖ͍͠ɻ
Q5. Perl͋ΔόʔδϣϯΑΓ @INCͷॱ൪͕มΘ͍ͬͯΔɻ มΘͬͨͷ࣍ͷ͏ͪͲΕ͔? (A) v5.10͔Β (B) v5.12͔Β (C) v5.14͔Β
A5. (B) v5.12͔Β
• @INCϞδϡʔϧαʔνύε͕ೖ͍ͬͯΔมɻ • @INCجຊతʹ * 1൪: CPANϞδϡʔϧೖΔsitelib * 2൪: coreϞδϡʔϧ͕ೖΔcorelib
ʹΑͬͯߏ͞ΕΔɻ • ͕ɺ5.10Ҏલcorelib, sitelibͷॱʹͳ͍ͬͯͨɻ • ͦͷ্ؔɺ5.10ҎલͰdual lifeϞδϡʔϧΛΠϯετʔϧ͢Δ ͱɺcorelibʹ্ॻ͖͞ΕΔɻ • CartonͷޙܧCarmel͕v5.12Λཁٻ͍ͯ͠Δͷ͜Ε͕ཁҼɻ
Q6. ҎԼͷίʔυΛWindowsͰ࣮ߦ͢Δͱ ʮHello, World!ʯ ͱදࣔ͞ΕΔɺ͞Εͳ͍?
A6. දࣔ͞Εͳ͍
• Windowsʹ͓͍ͯ ͨͱ͑ system LIST ܗࣜͰ͋ͬͯ ಛघจࣈΛΫΦʔτ͠ͳ͍ͱ͍͚ͳ͍Մೳੑ͕͋ Δɻ • ઌͷྫͩͱಛʹʮ"ʯ͕ͱͳͬͯ
ʮHello World!ʯͱදࣔ͞Εͳ͍ɻ • Windows༻ͷΫΦʔτʹɺWin32::ShellQuote ϞδϡʔϧΛ͏ͱΑ͍ɻ
͓ΘΓ