in reply to Issues with Split
my ($type, $restofstring) = /^type=(\w+) (.+)$/; for $restofstring(split){
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Issues with Split
by cipher (Acolyte) on Jun 14, 2016 at 05:06 UTC | |
by graff (Chancellor) on Jun 14, 2016 at 10:34 UTC | |
by cipher (Acolyte) on Jun 14, 2016 at 11:24 UTC |