Help for this page

Select Code to Download


  1. or download this
    sub occurences {                                                    
        my %h;          
    ...
        push @{$h{$_}}, $i++ for @_;
        return \%h;
    }
    
  2. or download this
    sub occurences { my ($i, %h) = 0; push @{$h{$_}}, $i++ for @_; \%h }
    
  3. or download this
    $ perl -Mstrict -Mwarnings -e '
        use Data::Dumper;
    ...
                       7
                     ]
            };
    
  4. or download this
    $ perl -Mstrict -Mwarnings -e '
        use Data::Dumper;
    ...
                       4
                     ]
            };