Hans Holtan wrote: > > Hi everyone, > I have a problem using Getopt::Std. I depend on use strict for all my > code, and when I use Getopt::Std all the variables it creates (to > hold the command line option values) are flagged by strict because > they have not been scoped. I get errors like this: > > Line 70: Global symbol "$opt_m" requires explicit package name > > If I don't use strict the program runs fine. Is there anything I can > do about this? Does anyone use both together?
Use a lexically scoped hash for the options: use strict; use Getopt::Std; my %options; getopt( 'ab:cde', \%options ); John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]