It's likely that you are using global variables (as a general thing that is bad) that are not getting initialised before main is called. Try moving all global variables into main - that will break stuff and mean that you have to pass the variables to any sub that needs them, but that is a good thing!
If that doesn't match with your code, show us the code or at least a stripped down version that demonstrates the issue.
In reply to Re: How to write testable command line script?
by GrandFather
in thread How to write testable command line script?
by thechartist
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |