Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
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 rifling through the Monastery: (6)
As of 2014-12-20 12:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (95 votes), past polls