I'm rather confused as to what "because the $1 backreference is lost once you exit the scope of the if/else" means to you, to me it sounds like you think $1 is cleared after you exit the scope it was declared in, which is clearly not true.
Am I missinterpreting your statements some how?
Yeah, I was missinterpreting. Consider this retracted.
Re: ?: and saving backreferences
Replies are listed 'Best First'.