Help for this page

Select Code to Download


  1. or download this
    #! perl -slw
    use strict;
    ...
    
    print nUniqC '1010101010';
    print nUniqC '1234567812';
    
  2. or download this
    sub nUniqC{
        my @uniq;
        scalar grep{ ++$uniq[$_] == 1 } unpack('C*',$_[0]);
    }
    
  3. or download this
    sub nUniqC{
        scalar grep{ ++$_[$_] == 1 } unpack('C*',$_[0]);
    }