Consider using Shell::POSIX::Select for the menus. For the price of a slight complication in code, you obtain robustness and greater user control.
Documenting variable declarations sounds good, and at one time was presented as an important software engineering technique. But look at your documentation:
my ($choice); # The user's choice.
my ($name); # Person's name
my ($date); # Birthday
my (@birthdays); # List of Birthdays.
my ($key);
Does "The user's choice" convey any more information than does "$choice"? or "Person's name" compared to "$name"? The one comment which clarifies the variable name is "$date" ... "Birthday", which leads me to suggest the variable name should be changed to "$Birthday". If you have comments, they should be more informative. As well, any information in comments appears once, at the declaration; any information in the variable name appears every time it is used.
Part of the reason C/Pascal/Ada programmers started using comments at the declaration is because declarations appeared at the top of the routine, far from the use. Variables $name and $date are only used at lines 33, 34, 35 and lines 54, 55, 56; @birthdays is only used lines 40-60. Declaring @birthdays at line 40, declaring $name and $date at line 33 and at line 54 means the names are totally sufficient documentation. As well, local declarations guarantee you don't have to worry about the variables being used elsewhere, simplifying comprehension.
My web site has an article on Coding Style, with links to stuff by Kernighan, Pike, chromatic, Mark-Jason, and many others. It makes interesting reading!
--
TTTATCGGTCGTTATATAGATGTTTGCA |