Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    
    ...
    $counter++ while $string =~ /..[GC]/gi;
    
    print "Found $counter occurences$/";
    
  2. or download this
    use strict;
    use warnings;
    
    ...
    $counter += $flag{$1} while $string =~ /..(.)/g;
    
    print "Found $counter occurences$/";