in reply to Subroutine not being found when being called from within its own module.

G'day curucahm,

Welcome to the Monastery.

Your problem is package-related. The error message indicates that Perl is looking for your subroutine in main (the default package); however, your code has that subroutine in package ScriptLibs::Menu.

If you don't know about packages, see the documentation in package for basic information. It has links to further details: follow them as required.

[Aside: You've included far too much code in your post. Most of it does not relate to the problem at hand. I only read the error message and then looked for "sub MenuNA" in your code. It's better to post a short piece of code that reproduces your problem; in fact, doing this will often highlight the problem for you. Please see "How do I post a question effectively?" for more discussion regarding this. When you do need to post "pages" of code, please use <spoiler> or <readmore> tags: "Writeup Formatting Tips" has more about this.]

Update: Having seen AM's response, my "problem is package-related" is wrong. I have stricken that part of my post. Please ignore.

— Ken