Uhm, it's a bit pointless to replace what you match by itself. m// instead of s/// is way better. But what's worse, you're printing the matching line, followed by the comma, dot, or question mark that was matched. The OP wants to print everything following the word it. There's no it in your pattern.