Fast string constructionby citromatik (Curate)
|on Apr 07, 2011 at 13:00 UTC||Need Help??|
citromatik has asked for the
wisdom of the Perl Monks concerning the following question:
I am storing some data in a long string of "ints":
Since the $keys in the file are not sorted, I need to initialize substr with enough values (to avoid a "substr outside of string" error). Currently I am doing it like follows:
Is there a more efficient way (maybe in one go instead of looping) of doing this?
Thanks in advance