I've seen worse code then that before.
My favorite was a block of code 100 lines long that opened 15 file handles, got some data from a sql database, and then wrote different portions of that data to each filehandle (if there was data pertaining to that handle) and then closed the file handles. There was so much code that it took me an hour to figure out what was going on and another hour of sitting in my chair laughing and wondering if the guy ever thought to use a loop. So I re-wrote it in a loop: 10 lines (not counting the sql query).