in reply to Morse::Code

<tangent>
Ever notice how the allocation of dots and dashes to characters resembles a Hufmann encoding?
. - E T / \ / \ .. .- -. -- I A N M / \ / \ / \ / \ ... ..- .-. .-- -.. -.- --. --- S U R W D K G O
Kinda makes sense, if you think about it for a moment. Morse code is an encoding designed to optimize bandwidth.
</tangent>

Replies are listed 'Best First'.
Re^2: Morse::Code
by tadman (Prior) on Apr 17, 2001 at 00:47 UTC
    This visualization actually might simplify the coding of a morse code converter (i.e. Perl Golf?). I read about it in "Code" (Microsoft Press, but perhaps out of print) and found it to be an intriguing way to visualize Morse code. It enables you to write a simple state machine instead of a more complex pattern matcher.

    BTW, tr doesn't require set brackets, but including them would just harmlessly convert them to same, right?     tr/[a-z]/[A-Z]/ Is theoretically equivalent to:     tr/[]a-z/[]A-Z/ Which is much like:     tr/[]/[]/; tr/a-z/A-Z/ Right? Although you would probably use uc instead.