Hi I have a problem,

I have a PM

i have this
A.pm :

package A;

my %b;

$b = {
   apple => \&foo1,
   oranges => \&foo2,
   open => \&foo3
};

sub foo1 {
  print "apples\n"
}

sub foo2 {
  print "oranges\n"
}

sub foo3 {
  my ($item) = @_;
  print $item."\n"
}

1;

## End Module

MAIN :

!#/bin/perl

lib "$ENV/";
use MOD::A;

$MOD::A::b{foo1}->();
$MOD::A::b{foo2}->();
$MOD::A::b{foo3}->("pairs");

exit();


Thats it, I keep getting a function undefined, I used require and exporter but I kept getting subruotine undefined...at times in the main:: and in the perl modules... I went around this by having the Hash of symbolic references in the main namespace so it works...I just need to know if PERL allows symbolic reference variables or hashs with symbolic references to be access in the Perl modules or just in the main.....


THank you in advance....



PERL RULEZ

_________________________________________________________________
Check out the latest news, polls and tools in the MSN 2004 Election Guide! http://special.msn.com/msn/election2004.armx



-- 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