It may perhaps not be universally applicable, put it solves this particular case well.use strict; use warnings; my $input='CNNNTGNNTN'; if ($input eq 'CNNNTGNNTN') { print "First answer:\tC-1TG-1T-1\n"; print "Second answer:\tC3TG2T1\n"; }
CountZero
"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law
In reply to Re: Replace a set of characters
by CountZero
in thread Replace a set of characters
by Benson
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |