On 1 August 2013 13:03, demerphq <demerphq@gmail.com> wrote: > On 1 August 2013 12:38, Ed Avis <eda@waniasset.com> wrote: >> Out of interest is there a performance boost from reapplying the last >> successfully matched regexp using // or is it just a golfing shortcut? > > Hypothetically a tiny boost. I should add that its a feature that has extremely limit utility. As far as I can tell it is only useful in a case like this: if (/pat1/ || /pat2/ || /pat3/) { s//$something/; # change whatever we matched } Or similar constructs. It actually makes no sense that it applies to m//, to the extent it should exist at all it should apply only to s///. Yves -- perl -Mre=debug -e "/just|another|perl|hacker/"Thread Previous | Thread Next