split has a third parameter to provide the maximum number of parts to split in. This could be used like this:
my @fields = map { split / /, $_, 2 } split /\s+KNOWNWORD\s+/, $string +;
In reply to Re: Help perlifying this string parse-o-rama
by hdb
in thread Help perlifying this string parse-o-rama
by balt
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |