in reply to Re^4: Out of Memory
in thread Out of Memory
Are you sure this is the most efficient way to do this?
Yes, I am quite sure.
For multi-character substring counting avoid creating the huge list:
$s = 'ab'x 10e6;; ++$n while $s=~ m[ab]g;; print $n;; 10000000
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Out of Memory
by Michael Kittrell (Novice) on Mar 28, 2013 at 19:31 UTC | |
by BrowserUk (Patriarch) on Mar 28, 2013 at 19:55 UTC | |
by Michael Kittrell (Novice) on Mar 28, 2013 at 22:33 UTC |