Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!spool.mu.edu!munnari.oz.au!yarra-glen.aaii.oz.au!pem From: pem@yarra-glen.aaii.oz.au (Paul E. Maisano) Newsgroups: comp.lang.perl Subject: Re: Perl 4.009 has at least one serious problem Message-ID: <1991Jun10.053757.7064@yarra-glen.aaii.oz.au> Date: 10 Jun 91 05:37:57 GMT Article-I.D.: yarra-gl.1991Jun10.053757.7064 References: Organization: Australian Artificial Intelligence Institute Lines: 35 marcl@ESD.3Com.COM (Marc Lavine) writes: >#!/usr/local/bin/perl ># ># This script demonstrates a bug in Perl 4.009. The regexp below should ># match the string, but it doesn't. Removing the 'i' switch or the caret ># makes it work. ># ># Written by Marc Lavine (marcl@3com.com). ># >print ( ( "A" =~ /^A/i ) ? "okay." : "uh oh...", "\n" ); Also the following does not work anymore (it may or may not be related to the above): ------------ #!/usr/local/bin/perl $x = "aa\001bb\001cc"; for (split(/\001/, $x)) { print $_, "\n"; } ------------ Under Patch Level 3 we get: aa bb cc Under Patch Level 9 we get: aabbcc Is /\001/ being treated as back-reference or something? (Perl was compiled on a sun 4/60, using cc under SUNOS 4.1.1, sun's malloc) --- Paul Maisano, Australian Artificial Intelligence Institute