There's a lot of really tight connections between your subs: main_block assumes that there are exactly 2 options, user_choice assumes it knows exactly what option 1 and option 2 are, etc.... Subs are really usefull from a design perspective because they setup a "black box" that will take some input, perform some actions, and produce some output. But by interconnecting them so much, you're losing all of their power -- no one can ever modify one of your subs without touching all of the other ones -- which kinda defeats the point.
That's not to say that they way you are doing things is inheriently bad given the scope of your script. I just think you are missleading anybody who ever reads your code in the future. You're script would accutally be more readable if you eliminated the subs, and had a basic sequential series of code.
In reply to Re: Shell Menu Code Review
by hossman
in thread Shell Menu Code Review
by PrimeLord
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |