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
In reply to Re: Issues with Split
by afoken
in thread Issues with Split
by cipher
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |