in reply to matching substrings on each line
Did I understand correctly, that you want to
- find string until first space /^(.*?)\s(.*)/; ($left, $right) = ($1, $2);
- split it by '-' characters @tokens=split /(?<=-)/, $left
- and find each of the tokens in right side string for $token(@tokens) { @result = $right =~ /$token/g }
In Section
Seekers of Perl Wisdom