my $count =()= 'AAAAA' =~ /AAAA/g; print "Found $count instances\n"
It prints 1, but I believe the OP wants 2. More specifically, from ATGCTGTACTG, I believe the OP wants
ACTG: 1 ATGC: 1 CTGT: 1 GCTG: 1 GTAC: 1 TACT: 1 TGCT: 1 TGTA: 1
In reply to Re^2: Find number of short words in long word
by ikegami
in thread Find number of short words in long word
by sedm1000
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |