[Xastir] Feature idea for Xastir

Curt, WE7U archer at eskimo.com
Tue Aug 28 17:02:06 EDT 2007


On Tue, 28 Aug 2007, Curt, WE7U wrote:

> Pig latin Perl (Erl-Pay) code:
>
>     <http://www.perlmonks.org/?node_id=3586>

Check out the 60-char regular expression on that page.  How easy
would it be to write a 4-line Perl script that takes a file on
STDIN, splits up each sentence that's not a comment into its various
components, runs the regexp on the text portion, then joins it back
and writes to STDOUT?

Who's going to be first?  It's a coffee-break sort of problem
time-wise:

    #!/usr/bin/perl
    @pieces = split;
    $pieces[?] =~ regexp;
    print join(@pieces);

Is that right?  Something like that anyway, with the 60-char regexp
thrown in instead of "regexp" and the '?' changed to the proper
index.

Run it like this:

    ./PigLatin.pl < language-English.sys > language-PigLatin.sys

--
Curt, WE7U: <www.eskimo.com/~archer/>     XASTIR: <www.xastir.org>
  "Lotto:  A tax on people who are bad at math." -- unknown
"Windows:  Microsoft's tax on computer illiterates." -- WE7U
The world DOES revolve around me:  I picked the coordinate system!



More information about the Xastir mailing list