$saved_line = get_line(?); # get source line number somehow s{whatever;} {whatever; inserted code; and another line of the same; #line $saved_line }g