
alfie at h4c
Nov 25, 2009, 1:30 PM
Post #1 of 7
(401 views)
Permalink
|
|
Re: m/// (was [PATCH] Functional substitution (s///f) )
|
|
Hi guys, On Thu, November 26, 2009 3:28 am, Jim Cromie wrote: > On Tue, Nov 24, 2009 at 3:37 PM, <hv [at] crypt> wrote: >> David Caldwell <david [at] porkrind> wrote: >> : I wrote a patch to scratch an itch I've had over the years. The patch >> :adds a new flag to s/// ("f") to make it functional instead of >> destructive. > > perhaps s///f should be spelled > m/// > > since the match doesnt change the string, > it makes more mnemonic sense than substitute /// fake A couple of weeks ago, this is exactly what I was trying to convince the guys at work what I needed Perl to do in this situation. Instead, they called me a heathen and chased me out the door with pitchforks. I'm glad other people see the need in this one. s///f looked like exactly what I wanted, but kinda ugly. m/// just makes sense! Alfie
|