From: Ian Macdonald Date: 2003-06-04T10:14:28+09:00 Subject: Re: case of sub! not working On Wed 04 Jun 2003 at 04:39:44 +0900, Michael Campbell wrote: > > I'll take a stab at it. I can't promise that > > what I say is correct. > > I gotcha. Ruby is doing this to avoid having to track the actual > changes to the string (outside of changes to ENV), and/or dealing > with copy-on-write semantics. > > Interesting; thanks. In my program, however, I would have been quite happy to have sub! just modify the copy of ENV['PATH'] that it had made, as I wanted to modify the path that would be used to find the location of a binary I was about to open with popen. I wasn't trying to modify the outside environment, just that of my script and any of it children. Ian -- Ian Macdonald | Breeding rabbits is a hare raising System Administrator | experience. ian@caliban.org | http://www.caliban.org | |