in reply to Re: count of a word occurrence
in thread count of a word occurrence
Same thing, just slightly shorter (and maybe clearer):
#! /usr/bin/perl use strict; use Data::Dumper; my %hash; /^(\d+).*/ and $hash{$1}++ for <DATA>; print Dumper \%hash; __DATA__ 817 5:00 817 5:00 817 5:15 123 4:45 817 5:30 495 7:45
_______________
DamnDirtyApe
Those who know that they are profound strive for clarity. Those who would like to seem profound to the crowd strive for obscurity. --Friedrich Nietzsche
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: count of a word occurrence
by Roy Johnson (Monsignor) on Mar 23, 2004 at 16:41 UTC | |
by DamnDirtyApe (Curate) on Mar 23, 2004 at 16:48 UTC |
In Section
Seekers of Perl Wisdom