Help for this page

Select Code to Download


  1. or download this
    use strict;
    my %count;
    ...
    s/([A-Z](?:[a-z])?)(\d*)/  $count{$1} += $2 ? $2  : 1 ;''/eg;
    
    printf "%-2s %3d\n", $_, $count{$_} for sort keys %count;
    
  2. or download this
    C    3
    H   19
    ...
    N    1
    O    1
    P    4