Pure Programmer
Blue Matrix


Cluster Map

Project: Morse Code

Write a program that converts a text message passed from the command line into [[Morse_code|Morse code]]. Use a Unicode Middle Dot (U+00B7) for dots and a Unicode Minus Sign (U+2212) for dashes. Use a space to separate letters and three spaces to separate words.

Output
$ perl MorseCode.pl Hello, World\! ···· · ·−·· ·−·· −−− −−··−− ·−− −−− ·−· ·−·· −·· −·−·−− $ perl MorseCode.pl The higher, the fewer. − ···· · ···· ·· −−· ···· · ·−· −−··−− − ···· · ··−· · ·−− · ·−· ·−·−·−

Solution