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
2.5k
昔のGo, 今のGo ~比較, ソート編~
skaji
0
170
cpm at PerlCon 2019
skaji
0
110
Perl5 Package Manager
skaji
0
660
Internal of cpm
skaji
0
570
How to execute external programs in Perl
skaji
3
570
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
Flutterを言い訳にしない!アプリの使い心地改善テクニック5選🔥
kno3a87
1
200
「今のプロジェクトいろいろ大変なんですよ、app/services とかもあって……」/After Kaigi on Rails 2024 LT Night
junk0612
5
2.2k
[Do iOS '24] Ship your app on a Friday...and enjoy your weekend!
polpielladev
0
110
WebフロントエンドにおけるGraphQL(あるいはバックエンドのAPI)との向き合い方 / #241106_plk_frontend
izumin5210
4
1.4k
Compose 1.7のTextFieldはPOBox Plusで日本語変換できない
tomoya0x00
0
190
Webの技術スタックで マルチプラットフォームアプリ開発を可能にするElixirDesktopの紹介
thehaigo
2
1k
レガシーシステムにどう立ち向かうか 複雑さと理想と現実/vs-legacy
suzukihoge
14
2.2k
Laravel や Symfony で手っ取り早く OpenAPI のドキュメントを作成する
azuki
2
120
Make Impossible States Impossibleを 意識してReactのPropsを設計しよう
ikumatadokoro
0
230
タクシーアプリ『GO』のリアルタイムデータ分析基盤における機械学習サービスの活用
mot_techtalk
4
1.5k
Micro Frontends Unmasked Opportunities, Challenges, Alternatives
manfredsteyer
PRO
0
110
as(型アサーション)を書く前にできること
marokanatani
10
2.7k
Featured
See All Featured
Intergalactic Javascript Robots from Outer Space
tanoku
269
27k
Ruby is Unlike a Banana
tanoku
97
11k
How to Think Like a Performance Engineer
csswizardry
20
1.1k
Statistics for Hackers
jakevdp
796
220k
Navigating Team Friction
lara
183
14k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.2k
Keith and Marios Guide to Fast Websites
keithpitt
409
22k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
28
2k
Happy Clients
brianwarren
98
6.7k
Designing on Purpose - Digital PM Summit 2013
jponch
115
7k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
[RailsConf 2023] Rails as a piece of cake
palkan
52
4.9k
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 ϞδϡʔϧΛ͏ͱΑ͍ɻ
͓ΘΓ