Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^3: Tips on how to perform this substitution?

by Tux (Abbot)
on Jan 22, 2014 at 14:47 UTC ( #1071625=note: print w/replies, xml ) Need Help??


in reply to Re^2: Tips on how to perform this substitution?
in thread Tips on how to perform this substitution?

That is way too complex :)

my $p = "--BBB----BB--B-------B--B--BBBB---B--"; my @x = qw( i o ); my $x = 0; $p =~ y/B/M/; $p =~ s/(-+)/$x[$x++%2]x length($1)/ge; say $p;

Enjoy, Have FUN! H.Merijn

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2016-10-01 11:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (576 votes). Check out past polls.