http://www.perlmonks.org?node_id=1039584


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