finish chap04 in intermediate perl