in reply to Search a string through IO::File API, and then print the lines after match in the file.
Why? Seems to me like an XY problem.
Rule One: "Do not act incautiously when confronting a little bald wrinkly smiling man."