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