Re: why warn on undefined $1?



ihok@xxxxxxxxxxx schreef:
Ben Morrow:
Or (better IMHO), use look-around assertions:

my $str = 'color colored tricolor floor';
$str =~ s/ (?<= col) or (?= (?: ed|ing|s)? \b) /our/gx;
print $str;
# colour coloured tricolour floor

Whoa. That's heavy.

$str =~ s{ (?<= colo) (?= r(?: ed|ing|s|) \b) }
{u}gx;

--
Affijn, Ruud

"Gewoon is een tijger."
.