Andrew Savige schreef: > Aristotle golfed: > > $_=$x;@lines=(/^.*/mg)x+length; > > Against my better judgment, I will have a go at golfing this: > > $_=$x;@l=(/^.*/mg)x/./s
This clobbers $_. Not nice for the rest of the program. Correct is: {local$_=$x;@l=(/^.*/mg)x/./s} or @l=(/^.*/mg)x/./sfor$x Unfortunately, you had "use strict" in your first post, and neither of these are use-strict safe. (-ugene -- Call a program "elegant" if no smaller program produces the same output. -- (, _| (haitin