I would change the following:
- use var qw(...) to the newer our $var, $var2,..;
- Add a package moduleA; in your module file.
- Either write $moduleA::readMode or use the Exporter package to export your mode variables to the main file
BTW: Are you sure that
pop(@_) is what I want, e.g. the last element of the list? Normally you do
shift @_. In both cases the
@_ is not needed because it's taken automatically inside a
sub.