in reply to Appending a single Scalar after a match

Um. This? $t =~ /^\s*(.*?)\s*$/g and $k .= $1

Though it puzzles me why you are using /g if you only want the first match?


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". I'm with torvalds on this
In the absence of evidence, opinion is indistinguishable from prejudice. Agile (and TDD) debunked

Replies are listed 'Best First'.
Re^2: Appending a single Scalar after a match
by SavannahLion (Pilgrim) on May 25, 2015 at 15:16 UTC

    Hhhmmm... good point. I must have had a good reason when I originally wrote it and didn't remove it the last time I updated the script. So updated.