Jacinta Richardson <jarich at perltraining.com.au> [060315 01:15]: > I don't think you mean to initialise $k where you do. Oops - my bad. Thanks for pointing it out Jacinta (and also the performance issue) - it serves me right for trying to be clever when actually, it's past my bed time! Cheers, Katherine