in reply to Idiom for setting variables to empty string if capture is undefined?
Similiar to what choroba said, I would change the variable names, too. But $x, $y, $z is not significantly better.
You could name them $match1, $match2, $match3, … - but then, why not simplymy @matches = 'abcd' =~ /(w)(x)(y)(z)/; print join ' ', @matches;
|
|---|