in reply to Need help on finish

use strict; use warnings; ...
That's a good start.