Help for this page

Select Code to Download


  1. or download this
    my $cnt = $str =~ tr/1//;
    
  2. or download this
    my %char_cnt;
    ++$char_cnt{$_} for split //, $str;