in reply to Re^3: Delete line if REGEX == true
in thread Delete line if REGEX == true

The -i flag causes perl to do exactly what I've described above. It's shorter syntax, sure, but it still copies the parts of the file you want to keep, then renames the resulting file.