$ cat file1 $i++; $ only-in file1 file2 Nested quantifiers in regex; marked by <-- HERE in m/^$i++ <-- HERE ; $/ at /home/qmechix/only-in line 27.