John Macdonald skribis 2005-03-18 12:00 (-0500): > I've had times when I wanted to be able to use chop at either > end of a string.
In fact, won't things be much easier if shift and pop workend on strings as well as on arrays? Now that we have multis, this should be easy to do. (For symmetry, this'd also require push to be a synonym for ~= and unshift to be a synonym for s/^/.../. Two things I would certainly like having. (The symmetry is slightly broken, though, because if you push "foo" once, you have to pop three times to get it back. I don't think this is a problem.)) This kind of dwimmery already exists for reverse and would work well with split (regex or string) too. If slice is added to splice, substr can just be an alias for slice (or disappear), and slice can call splice if there's a 4th argument. Juerd -- http://convolution.nl/maak_juerd_blij.html http://convolution.nl/make_juerd_happy.html http://convolution.nl/gajigu_juerd_n.html