in reply to Re: Find number of short words in long word
in thread Find number of short words in long word
I don't know if it is important for the OP, but your code doesn't find overlapping instances:
my $count =()= 'abrabrabrabra' =~ /brabra/g; print "Found $count instances\n" # prints Found 2 instances (not 3)
Rule One: "Do not act incautiously when confronting a little bald wrinkly smiling man."
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Find number of short words in long word
by moritz (Cardinal) on Jul 14, 2009 at 20:50 UTC | |
by AnomalousMonk (Archbishop) on Jul 14, 2009 at 23:37 UTC | |
|
Re^3: Find number of short words in long word
by sedm1000 (Initiate) on Jul 14, 2009 at 20:54 UTC | |
by SuicideJunkie (Vicar) on Jul 14, 2009 at 22:50 UTC |