perldoc -q count
Perl Idioms Explained - my $count = () = /.../guse warnings; use strict; my $str = "thisthis"; if ( my $n = () = ($str =~ m/this/g) ) { print qq{Found $n occurrence(s) of "this"\n}; } __END__ Found 2 occurrence(s) of "this"
In reply to Re: Count number of occurrences of a substr
by toolic
in thread Count number of occurrences of a substr
by Jerbear217
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |