Use strict,warnings; fix reported problems.