in reply to remove a blank line after a string

I like Davido's solution but prefer this for clarity, if not the extra characters (anti-golfing?)-
For (0 .. $#{$msg} ) { If (msg->[$_] =~ m/\QContent-Transfer-Encoding: 7bit\E/i) { If ( next line is blank ) { Splice last; } } }