laziness, impatience, and hubris | |
PerlMonks |
Re: Issues with Splitby afoken (Chancellor) |
on Jun 14, 2016 at 04:08 UTC ( [id://1165524]=note: print w/replies, xml ) | Need Help?? |
You are splitting the entire line read ($_), not what (.+) matched ($restofstring). And you are overwriting $restofstring. You need a different loop variable, and you need to pass $restofstring as second argument to split. Alexander
-- Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
In Section
Seekers of Perl Wisdom
|
|