my $count = $string =~ tr/;/;/ #### my $count = $string =~ tr/;// #### # my $count = $_ =~ tr/;// # same thing my $count = tr/;// #### my $count = 0; while( <$fh> ) { $count += tr/;// } #### my $count = 0; while( <$fh> ) { $count += my @cities = split /;/; }