ill provide it shortly. please stay tuned.

in the meanwhile, i recommend getting comfortable with Perl's regular expression variables, and the qr// operator (very useful!). Here is an excerpt from the Perl 5.10 documentation.
VARIABLES $_ Default variable for operators to use $` Everything prior to matched string $& Entire matched string $' Everything after to matched string $1,$2... Hold the Xth captured expr $+ Last parenthesized pattern match $^N Holds the most recently closed capture $^R Holds the result of the last (?{...}) expr @- Offsets of starts of groups. @+ Offsets of ends of groups.
Here is an application you will need:
use strict; use Data::Dumper; my $con = qr/[b-df-hj-np-tv-xz]/; my $vow = qr/[aeiouy]/; my $ncon = qr/[^b-df-hj-np-tv-xz]/; my $nvow = qr/[^aeiouy]/; my $x = 'battlestar galactica'; my $y = 'silly ahab'; ($x,$y) = map{swap($_)}($x,$y); print Dumper([$x,$y]); sub swap { my $x = shift; if($x =~ /(${con})(${ncon}*?\b)(${ncon}*?)(${con})/){ $x = $`.$4.$2.$3.$1.$'; } $x }
Produces:
$VAR1 = [ 'battlestag ralactica', 'silhy alab' ];

In reply to Re^4: unglue words joined together by juncture rules by mobiusinversion
in thread unglue words joined together by juncture rules by pc2

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.