Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Appending a single Scalar after a match

by BrowserUk (Patriarch)
on May 25, 2015 at 09:05 UTC ( [id://1127662]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1127662]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2024-04-23 21:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found