and how could I go about avioding the problem of the Perl compiler not finding the variables in the formats because they're not local to the format module itself
Take a look at other modules to see how other people solved those problems. Most variables that you use globally in your module are stored like this: $self->{'variable'} = 'value';