in reply to Bug? Use of uninitialized value $1 in substitution iterator
The e switch lets you use code for the replacement, so you can test whether $1 is defined before using it, and if it's not defined, use the empty string instead.s{^(?:aa(bb))?.*}{defined($1)?$1:q{}}ei;
|
|---|