I am trying to remove entries if they contain the word "connected" in Perl. My file looks something like below. So In this example, I would like to search for "connected" and if found remove all 6 lines associated with it. If not found, then move on to the next entry. I was trying to split the file by blank lines but I am not having much success. Can anyone help? Thanks
........
PIN connected<112>
USE TEST ;
PORT
LAYER TRUE ;
END
END connected<112>
PIN address<110>
USE TEST ;
PORT
LAYER TRUE ;
END
END address<110>
PIN connected<11>
USE TEST ;
PORT
LAYER TRUE ;
END
END connected<11>