Thread substr_count in perl (29 answers)
Opened by norman at 2004-07-14 14:52

pq
 2004-07-14 15:03
#84290 #84290
User since
2003-08-04
12208 Artikel
Admin1
[Homepage]
user image
buchstaben zählen:
my $count = $string =~ tr/a//;
strings zählen:
my $match = "gesucht";
my $count = () = $string =~ m/\Q$match/g;
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. -- Damian Conway in "Perl Best Practices"
lesen: Wiki:Wie frage ich & perlintro Wiki:brian's Leitfaden für jedes Perl-Problem

View full thread substr_count in perl