Hi,
Hello,
package options;
use strict;
use warnings; ### This might have helped
use base qw(Exporter);
our @EXPORT = qw(@BenefitsOptions %BenefitsOptions);
#our @EXPORT_OK = qw(); # If your not going to export anything,
# you might as well leave this out.
our %BenefitsOptions = (
"Dental" => 1,
"Full" => 2,
"Base" => 3,
"Comm." => 4, # Do you really want a period (.) here?
"END" # What is this for?
);
# @BenefitsOptions = ();
# This causing errors.
my @BenefitsOptions = (); # Works with strict pragma.
1;
...
Vance
I can't see what the problem is apart from the points above. This works for me
#!/bin/perl
use strict;
use warnings;
use options;
print "Comm. is $BenefitsOptions{'Comm.'}\n";
>Comm. is 4
Perhaps you edited this for the email. Good luck,
Dp.
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/