Hi.
Im not shure what you really want to load into the variable, select or all the line after the text select?
Try to change $_ for $1 (this its how perl saves the matched regex after the next iteration or line)
But...explain better what you want to get in the output