morse - translate text to morse code
morse [-frs] [file ...]
morse [-rs] [string ...]
morse takes input from either a list of files, standard input or command line arguments. Morse code can be given in either short form (-- --- .-. ... .) or long form (daw daw, daw daw daw, dit daw dit, dit dit dit). Long form is used by default.
Short-form morse uses both spaces and newline characters as a separator. Long-form morse requires a space between each 'dit' or 'daw'. Long-form also requires a comma or newline character as a separator for each morse code.
A morse code document may be translated back to text. The program will terminate if it encounters a series of dots and dashes that it cannot translate.
The following options are available:
Treat command arguments as files instead of morse code strings.
Decode input from morse to text.
Process short-form morse (dots and dashes) instead of the default long-form. The argument '--' should precede any morse code provided as command arguments.
The working of morse is not influenced by any environment variables.
Decode short-form morse from stdin.
echo - .- --- | morse -rs
Decode long-form morse from stdin.
echo daw, dit daw, daw daw daw | morse -r
Decode short-form morse from argument list. Note that '--' terminates the processing of command options, so the first morse code is '-'.
morse -rs -- - .- ---
Decode long-form morse from argument list.
morse -r daw, dit daw, daw daw daw
Encode short-form morse from stdin.
echo foo | morse -s
Encode long-form morse from stdin.
echo foo | morse
Encode short-form morse from argument list.
morse -s tst txt
Encode long-form morse from argument list.
morse tst txt
Decode short-form morse from files.
morse -frs file1 file2
Decode long-form morse from files.
morse -fr file1 file2
Encode short-form morse from files.
morse -fs file1 file2
Encode long-form morse from files.
morse -f file1 file2
The Perl implementation of morse was written by Abigail, firstname.lastname@example.org. The program was extended by Michael Mikonos.
This program is copyright by Abigail 1999.
This program is free and open software. You may use, copy, modify, distribute and sell this program (and any modified variants) in any way you wish, provided you do not restrict others to do the same.
To install PerlPowerTools, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.