Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re: letter mix

by btrott (Parson)
on Jun 16, 2001 at 01:11 UTC ( #88939=note: print w/replies, xml ) Need Help??

in reply to letter mix

Couldn't you just do this?
$data1 =~ s/(\S)(\S)/$2$1/g;
This takes two non-space characters in a row, and swaps them.

Perhaps it has slightly different behavior than yours, though. I only tested it on your example.

Replies are listed 'Best First'.
Re: Re: letter mix
by mexnix (Pilgrim) on Jun 16, 2001 at 01:44 UTC
    I assumed that you had to split every 2 letters, then regex them so that they all swicthed. You know what happens when you assume things...

    %mexnix = (email = > "", website => "");

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://88939]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (8)
As of 2016-10-25 08:01 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (315 votes). Check out past polls.