Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Perl Substr

by hbm (Hermit)
on Jun 18, 2013 at 16:14 UTC ( #1039584=note: print w/replies, xml ) Need Help??


in reply to Perl Substr

Not sure how you want to "save" multiple columns into a scalar, but consider:

$_ = 'one two#three=four five=six#seven eight=nine'; print join '.', (/([^#= ]+)/g)[1,2,4..6]; #prints #two.three.five.six.seven

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2021-09-17 08:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?