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.