intermediate perl homework