"Dat Nguyen" <thucdat / hotmail.com> writes:

> Delta
> Alpha
> Tango
> 
> November
> Golf
> Uniform
> Yankee
> Echo
> November

This reads from the command line, but the principle's the same

alphabet = { 
  "A" => "Alpha",
  "B" => "Bravo",
  "C" => "Charlie",
  "D" => "Delta",
  "E" => "Echo",
  "F" => "Foxtrot",
  "G" => "Golf",
  "H" => "Hotel",
  "I" => "India",
  "J" => "Juliet",
  "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" }

for word in ARGV
  word.scan(/[a-zA-Z]/).each do |letter|
    puts alphabet[letter.upcase]
  end
  printf "\n"
end