Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

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

by Tux (Monsignor)
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


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

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 browsing the Monastery: (7)
As of 2015-07-31 03:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (274 votes), past polls