Phoenix.pm: oldest bug in current perl? (Regex replace looses
chars)
Bill Lindley
wlindley at wlindley.com
Mon Dec 22 10:23:02 CST 2003
Hmm...
> $_="65x"; s/65/$_-65/e; $res1 = $_;
>
>
Looks to me like this should change the "65" to "0" and produce "0x"
> $_="x65x"; s/x//; s/65/$_-65/e; $res2 = $_;
>
>
Looks to me like this should eliminate the 'x's, and produce "0"
> print $res1 eq $res2 ? "ok\n" : "not ok res1[$res1]res2[$res2]\n";
>
>then I see the same result in perl4 as in bleed:
>
> not ok res1[0x]res2[0]
>
>
Why's it "not ok"?
\\/
More information about the Phoenix-pm
mailing list