in reply to extract sequences of certain letters and assign it to a variable
so maybe you need one more + in CountZeros code to get substrings instead of letters.
please compare the differences:
use strict; use warnings; my $a = "bbzvbvxmgbnmnvxyyz"; my @all = $a =~ m/([zvxg])/g; print "@all\n"; @all = $a =~ m/([zvxg]+)/g; print "@all\n"; __END__ # OUTPUT FOLLOWS z v v x g v x z zv vx g vx z
Cheers LanX
- - - - - Which song???
|
|---|