in reply to Re: remove first and last character of string
in thread remove first and last character of string

It's not clear to me if flieckster intends to deal only with strings like '"foo"' (from which it is clear that 'foo' should be extracted), or if he or she may also be dealing with strings like 'foo' '"foo' 'foo"' 'f"o"o' etc., i.e., strings not having double-quotes at both the start and end of the string.

In the latter case, it should be noted that
    qr/^\"(.+)\"$/
will not match and will return an empty list, leaving $got undefined.


Give a man a fish:  <%-{-{-{-<