Don't feel too bad - you can't ever dream of writing a decent script without a few while loops