From: Chad Perrin Date: 2010-09-27T10:40:01+09:00 Subject: Re: bug in gsub(?) --2oS5YaxWCcQjTEyO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Sep 26, 2010 at 03:54:35PM +0900, Brian Candler wrote: > Chad Perrin wrote: > > I've wondered for quite a while what was the rationale for having \1 in > > the first place. >=20 > Ruby inherits a lot from Perl, and Perl from sed. Okay . . . I guess that sorta makes sense. Of course, I've never used \1 in Perl, nor seen anyone else do so either, so until you mentioned it I had entirely forgotten that was an option there either. Both languages would be better off without that syntax, and just stick with $1 instead, I think. >=20 > Some of the Perlisms are IMO superfluous - in particular the Kernel=20 > methods which operate on $_, and the flip-flop conditional operators. I wouldn't really call \1 a "Perlism", given that the way I've always seen it done is with $1 instead. If it's a Perlism despite its lack of general usage, I'd say it's every bit as much a Rubyism. --=20 Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ] --2oS5YaxWCcQjTEyO Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAkyf9PUACgkQ9mn/Pj01uKUxTwCdFuMubzMr7q42yxBb7DPU6r2g oHgAoIFZ7Csp62iUXisuvfwsVO9GjhDa =Hnl5 -----END PGP SIGNATURE----- --2oS5YaxWCcQjTEyO--