in reply to Re^2: Fast Way to Split String in to Chunk of Equal Length
in thread Fast Way to Split String in to Chunk of Equal Length
At it again. Unannounced updates. The above post originally consisted entirely of just:
Any implementation in mind? Something like the following?while ($seq =~ /(.{3})/sg) { # Substring in $1 ... }
To answer the dumb question that wasn't there originally,
How can you not know in advance how many fields there are (int(length($seq)/3))?
If you have to calculate the number, you throw away the few percent gained.
|
|---|