As a new perl learner, here I will write some perl codes.