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;
Once (shame on you!)
Twice (shame on me!)
More often than I'd like to be
All the time
Just when answering stupid polls
Who you callin' a fool?
I refuse to vote in this ridiculous poll
Results (533 votes). Check out past polls.