I tried recursive, but it was much longer because defining and calling a function takes keystrokes... I honestly don't think you can improve the script much.. although I challenge anyone to try. ($C = "" doesn't matter unless you have a $c in the program you are using, but I put it in there for good measure.)

Brian