in reply to Re^3: counting inside the loop
in thread counting inside the loop
$s='finding related pages finding on the world wide web'; my $count=$s=~ m/finding/g; print $count;
I expect the result as 2.. becus "finding" exists two times in $s. but the output is 1. Why??
thanks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: counting inside the loop
by Anonymous Monk on Jul 04, 2011 at 06:22 UTC |