Replace <DATA> with "<>" to run it for real, and either pipe in the data file or pass the filename as an argument to the script.my %count; while(<DATA>) { chomp; tr/,/\t/; $count{$_}++; } foreach(sort keys %count) { print "$count{$_}\t$_\n"; } __DATA__ abcd,US abee,UK abcd,US adee,US
In reply to Re: Dear Monks
by bart
in thread Dear Monks
by sivaraman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |