in reply to sub fuction inside sub functioin?

Have you read perlsub?