Help for this page

Select Code to Download


  1. or download this
    while (defined (my $line = <STDIN> )) {
            chomp $line;
            my @currentline = split /\s+/, $line;
            $histogram{$_}++ for @currentline;
    }
    
  2. or download this
    if( exists $histogram{$word} ) {
        print "Found $word,  $histogram{$word} times\n";
    }
    
  3. or download this
    use Data::Dumper;
    
    ...
    $VAR1 = [
              ' '
            ];