Thread substr_count in perl
(29 answers)
Opened by norman at 2004-07-14 14:52
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: Wie frage ich & perlintro brian's Leitfaden für jedes Perl-Problem |