From: "Berger, Daniel" Date: 2003-01-11T05:52:47+09:00 Subject: Re: dot-equals method? > -----Original Message----- > From: Hal E. Fulton [mailto:hal9000@hypermetrics.com] > > Hello, > > > > I keep finding myself wanting to write things like this: > > > > string.=reverse > > input.=split /\s*/ > > > > instead of this: > > > > string = string.reverse > > input = input.split /\s*/ > > I understand. But in these two cases I guess > you'd want reverse! and split! instead. I don't think there's a split! method since that would cause a type change on the receiver (string to array). However, if you happen to know the exact format of the string, unpack is faster than split: S = 'hello' S = S.unpack("AAAAA") Regards, Dan