Last active
August 29, 2015 14:10
-
-
Save cfedde/43b939de6d0bab7914fe to your computer and use it in GitHub Desktop.
Phonetics
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/env perl | |
use Modern::Perl; | |
use YAML::XS; | |
use autodie; | |
my %alpha = qw( | |
A Alfa | |
B Bravo | |
C Charlie | |
D Delta | |
E Echo | |
F Foxtrot | |
G Golf | |
H Hotel | |
I India | |
J Juliett | |
K Kilo | |
L Lima | |
M Mike | |
N November | |
O Oscar | |
P Papa | |
Q Quebec | |
R Romeo | |
S Sierra | |
T Tango | |
U Uniform | |
V Victor | |
W Whiskey | |
X X-ray | |
Y Yankee | |
Z Zulu | |
- Dash | |
0 Zero | |
1 One | |
2 Two | |
3 Three | |
4 Four | |
5 Five | |
6 Six | |
7 Seven | |
8 Eight | |
9 Niner | |
. Stop | |
); | |
for ("A" .. "Z") { | |
$alpha{$_} = "$_ as in $alpha{$_}"; | |
} | |
for ("0" .. "9") { | |
$alpha{$_} = "The number $alpha{$_}"; | |
} | |
$alpha{' '} = 'Space'; | |
say join " ", @ARGV; | |
print join ", ", map { | |
(/[a-z]/ ? "Lower case ": /[A-Z]/ ? "Upper case " : "") | |
. $alpha{uc $_}//$_ | |
} split( //, join " ", @ARGV); | |
print "\n"; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment