in reply to Are strings lists of characters?
There happens to be a CPAN module that allows one to tie a list to a string: Tie::CharArray.
I've never used it since I generally got around with substr for iterating over strings, but some tests I ran just now seem to show that it works pretty well.
There have been a few situations where I really wished I could treat strings as arrays, but since substr can be assigned to I could get around this limitation. A specific example that comes to mind is the implementation of a genetic programming algorithm where I prefered to have strings rather than lists as datatypes for the chromosomes.
Hope this helps, -gjb-
|
|---|