in reply to Re^2: chopping a string into slices - is there a more elegant way to do it?
in thread chopping a string into slices - is there a more elegant way to do it?
IMHO additional parentheses improve the readability, emphasizing that the match-op is evaluated in a list-context.That's a really bad reason to use parenthesis, because they do NOT provide list context. Compare:
Here parenthesis are used, but the match is in scalar context.$a = ("abcdefg" =~ /.{1,$ml}/g);
|
|---|