Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!samsung!uunet!mcsun!cernvax!chx400!chx400!urz.unibas.ch!brocher From: brocher@urz.unibas.ch (Dominic Brocher) Newsgroups: comp.lang.perl Subject: Re: recursive &func breaks s/(foo)/&func($1)/eg Message-ID: <1991Mar13.083035.1441@urz.unibas.ch> Date: 13 Mar 91 07:30:35 GMT References: <5128@atexnet.UUCP> Organization: University of Basel, Switzerland Lines: 37 In article <5128@atexnet.UUCP>, lawrence@epps.kodak.com (Scott Lawrence) writes: > I think that I have discovered a problem with substitution and > recursion. Please someone demonstrate that I am wrong. I have executed your script on a microVAX 3500 running Ultrix 4.1 with the same version of perl you used: This is perl, version 3.0 $Header: perly.c,v 3.0.1.10 91/01/11 18:22:48 lwall Locked $ Patch level: 44 I get exactly the same (wrong) result: Result => ( ( &In('foo') & &In('bar') ) But on a NeXT running NeXT Mach 1.0 and the same version of Perl I get the right result! Result => ( ( &In('foo') & &In('bar') ) | &In('done') ) I have compiled Perl myself on both machines from the same source code and they both passed all test. I'd really like to know the reason for this behaviour (and have a fix for it, of course :-) > -- > Scott Lawrence Voice: 508-670-4023 > Atex Advanced Publishing Systems Fax: 508-670-4033 > Atex, Inc; 165 Lexington St. MS 400/165L; Billerica MA 01821 -- Dominic -------------------------------------------------------------------------------- I am not bound to please thee with my answers. | Dominic Brocher -- Shylock, in The Merchant of Venice (IV, 1/65) | brocher@urz.unibas.ch ================================================================================