A better version which preserves comment lines:

    > cat PigLatin2.pl
    #!/usr/bin/perl -n
    if (m/^#/) { print; next; }
    @pieces = split /\|/;
    $pieces[1] =~ s/\b(qu|y(?=[^t])|[^\W\daeiouy]*)([a-z']+)/$2.($1||w).ay/eg;
    print join '|', @pieces;


--
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!
_______________________________________________
Xastir mailing list
Xastir@xastir.org
http://lists.xastir.org/cgi-bin/mailman/listinfo/xastir

Reply via email to