Help for this page

Select Code to Download


  1. or download this
        my $hyphens = 0;
        $hyphens++ while $str =~ /-/g;
    
  2. or download this
        my $hyphens = length $1 if $str =~ m{\A(-*)};
    
  3. or download this
    $ perl -Mstrict -Mwarnings -le '
    > my @strings = qw{--aacgtACG ctgGTTAtga};
    ...
    --aacgtACG - 2
    ctgGTTAtga - 0
    $