Help for this page

Select Code to Download


  1. or download this
    C:\test>p1
    use List::Util qw[ sum ];;
    ...
    
    print sum map{ $_ > 1 ? $_ - 1 : () } values %seen;;
    13
    
  2. or download this
    @selected_data = qw(13 76 90 13 77 100 76 300 13 65 400 74 89 34 65);
    @all_data = qw(1 5 2 8 12 87 13 76 98 77 89 90 11 65 43 74 43 32 34 67
    +);
    ...
    
    print $count;;
    12