learning perl exercise