in reply to Re: How to count substrings in an array?
in thread How to count substrings in an array?
... and you don't even need the '+' on the += operator:
>perl -wMstrict -lE "my $s = 'abababa'; my $t = 'aba'; ;; my $c = map /(?=$t)/g, qw(abababa ababa); say $c; " 5
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: How to count substrings in an array?
by BrowserUk (Patriarch) on Feb 03, 2013 at 11:32 UTC |
In Section
Seekers of Perl Wisdom