open(FILE,"whatever.log"); my %seen = (); while(my $line = <FILE>){ my ($first) = ($line =~ /^(/S+)/)[0]; $seen{$first}++; } print scalar keys %seen;
In reply to Re: Counting lines starting with a unique string
by thunders
in thread Counting lines starting with a unique string
by ezekiel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |