Hi all, I'm trying to understand how to use map correctly to apply several regexps at once, something like:
my @fields = $line.split( ',' ).map: { s:g/\'//; s:g/^\"|\"$//; $_ };
while the first regexp works, the second fails with "Cannot modify an
immutable Str", but the topic variable should be considered, not a
literal string.
I would replace it with the S operator, but I believe it would not do
what I want since a new string will be created as output of any
regexp.
Any suggestion?
Luca
