Matt Diephouse skribis 2004-06-30 20:51 (-0400): > my $string = "Hello, World!"; > say $string[0..4]; # prints "Hello\n" > $string[7...] = "Larry!"; > say $string; # prints "Hello, Larry!\n"
And that "array" is one of bytes? graphemes? In general, I like the idea. In <[EMAIL PROTECTED]>, almost the same was suggested, but implemented differently: a string's .bytes method in list context (but isn't it array context, technically?) would dwym. As would the other parts-of-string methods. Perhaps without method, the string in array/list context can default to the default set by a lexical pragma. Which, I hope, has a default itself. (I like default defaults...) Juerd