mathew wrote: > with a[1] > strip > empty > end Sorry, that should of course have been with a[1] strip! empty? end or similar. Hopefully you get the basic idea anyway, and someone can refine the semantics if they like it... mathew