Help for this page

Select Code to Download


  1. or download this
    use strict;
    my @array = qw(foo bar foobar foobar bar bar bar bar foo foo foo foo b
    +ar foobar);
    ...
    foreach (keys %hash) {
        print "$_ appears $hash{$_} times\n";
    }
    
  2. or download this
    foobar appears 3 times
    foo appears 5 times
    bar appears 6 times