in reply to using regular expression to extract subset from a line

It looks like you want everything after "-f" up to "makefile", how about the following:
use strict; while(<DATA>){ print m|-f\s+(\S+makefile)|i; } __DATA__ make -r -f ..\../tools/cell/makefile cell.lib
Depending on how you're testing your regex, your problem could be whether you're escaping the "\" in your string.