Help for this page

Select Code to Download


  1. or download this
    my($words, %everything);
    my @countKey = keys %everything;
    my @countValue = values %everything;
    
  2. or download this
    foreach my $word(split /\s+/, $input) {
        $everything {$word}++; 
        $words++;
    }
    
  3. or download this
    foreach $word(keys %everything) {
        print "$word was seen $everything{$word} times\n";
    }
    
  4. or download this
    print start_table({-border=>1});
    print Tr(td('Keys'), td('Values'));
    print Tr(td(print("@countKey")), td(@countValue));
    
    print end_table;