Hi,
I am trying to pass a hash from a package to my script with the following.
Can anyone tell me why it doesn't work?
the_package.pm-------------------
#!/usr/local/ActivePerl-5.6/bin/perl -w
package the_package;
require Exporter;
@ISA = qw(Exporter);
@EXPORT = qw(%exp_hash);
use WWW::Mechanize;
use strict;

my %exp_hash;
$exp_hash{val1}=1;
$exp_hash{val2}=2;
$exp_hash{val3}=2;

the_script.pl-------------------------------------
#!/usr/local/ActivePerl-5.6/bin/perl -w
use warnings;
use strict;
use the_package;
my $value;
foreach $value (keys %exp_hash) {
 print $exp_hash{$value};
 }
print $exp_hash{val1};



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to