in reply to Find a filename in a text file

Maybe you'll find useful the  -f operator. perldoc -f -f