Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
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 universe expands...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2016-12-08 16:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (144 votes). Check out past polls.