http://qs321.pair.com?node_id=1099092


in reply to LED blinking Morse code from Raspberry Pi

I would probably use a more declarative approach to the Morse code:
my %morse = ( a => '.-', b => '-...', c => '-.-.', d => '-..' , e => '.', f => '..-.', g => '--.', h => '....', i => '..' , j => '.---', k => '-.-', l => '.-..', m => '--', n => '-.', o => '---', p => '.--.', q => '--.-', r => '.-.', s => '...', t => '-', u => '..-', v => '...-', w => '.--', x => '-..-', y => '-.--', z => '--..', ' ' => ' ' , ); key $morse{$_} for split //, lc shift;
لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ