use strict; use warnings; my %hash = (); while (<DATA>) { chomp; $hash{$_}++; } foreach (keys %hash) { print "$_ appears $hash{$_} time(s).\n"; } __DATA__ 123 56 123 56 234 45 123 56 678 93 678 93
In reply to Re: Hash and count of data values
by monktim
in thread Hash and count of data values
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |