which means the scalar has lesser space than the array, I know join gets into a string different elements but I did not know that there is a difference in the size when we are talking contexts of scalar and lists... | [reply] |
| [reply] |
The scalar also contains less information, and the process is NOT generally reversible.
It is quite easy to reduce the memory use when your algorithm is allowed to be lossy :)
For example, consider my @array = (1, 5, "hello,world!", 3.1415); There is no way to restore the original array after doing a join ',',@array on it. "1,5,hello,world!,3.1415" could have been (1, 5, "hello,world!", 3.1415) or it could have been (1, 5, "hello", "world!", 3.1415).
| [reply] [d/l] [select] |