Phoenix.pm: [andreas.koenig@anima.de: Re: [perl #24704] oldest bug in current perl? (Regex replace looses chars)]

Scott Walters scott at illogics.org
Mon Dec 22 02:03:26 CST 2003


Here's a regex bug that has existed since perl 4 and is in the latest version of 5 =)

I *love* the perl-5-porters bug reports. I had no idea how buggy perl was until
I started following this list. The average months brings a dozen incorrect results,
half a dozen inconsistent behaviors, two portability/build issues, and a coredumper.

-scott

----- Forwarded message from Andreas J Koenig <andreas.koenig at anima.de> -----

ID: <87ad5lffya.fsf_-_ at franz.ak.mind.de>
List: contact perl5-porters-help at perl.org; run by ezmlm
Status: No, hits=-4.9 required=7.0 tests=CARRIAGE_RETURNS,IN_REP_TO,REFERENCES,RT_TAG,SPAM_PHRASE_00_01,USER_AGENT,USER_AGENT_GNUS_UA,X_AUTH_WARNING version=2.44
post: <mailto:perl5-porters at perl.org>
By: la.mx.develooper.com
SMTPD: qpsmtpd/0.26, http://develooper.com/code/qpsmtpd/
Type: text/plain; charset=us-ascii
Spam-Index: -6.7
Filter-Rule: None, default is delivery
References: <rt-3.0.7_01-24704-68587.10.0650134616711 at perl.org>	<20031221141124.7669.BQW10602 at nifty.com>	<20031221142305.766C.BQW10602 at nifty.com>
Archive: <http://nntp.perl.org/group/perl.perl5.porters/86565>
help: <mailto:perl5-porters-help at perl.org>
Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux)
Received: from onion.perl.org (onion.develooper.com [63.251.223.166]) (qmail 15213 invoked by uid 1005); 22 Dec 2003 07:51:52 -0000 (qmail 15194 invoked by uid 76); 22 Dec 2003 07:51:52 -0000
Warning: franz.ak.mind.de: k set sender to andreas.koenig at anima.de using -f
Cc: perl5-porters at perl.org
Subject: Re: [perl #24704] oldest bug in current perl? (Regex replace looses chars)
unsubscribe: <mailto:perl5-porters-unsubscribe at perl.org>
Spam-Is-Higher-Than: 5
Date: Mon, 22 Dec 2003 08:51:25 +0100
Version: 1.0
Precedence: bulk
To: mailing list perl5-porters at perl.org perl5-porters at perl.org SADAHIRO Tomoyuki <bqw10602 at nifty.com> <20031221142305.766C.BQW10602 at nifty.com> (SADAHIRO Tomoyuki's message of "Sun, 21 Dec 2003 14:30:39 +0900")
From: Andreas J Koenig <andreas.koenig at anima.de>


If I rewrite the test to not use chr() but something that existed in
perl4, say

  $_="65x";         s/65/$_-65/e; $res1 = $_;
  $_="x65x"; s/x//; s/65/$_-65/e; $res2 = $_;
  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]

-- 
andreas

----- End forwarded message -----



More information about the Phoenix-pm mailing list