use strict; while(){ print m|-f\s+(\S+makefile)|i; } __DATA__ make -r -f ..\../tools/cell/makefile cell.lib