Hi. Please allow me to ask another silly question. I wrote the program and it works fine.
-------------------------------------------------------------------- Animal.pm package Animal; use Exporter; @ISA = qw(Exporter); @EXPORT = qw(speak); sub speak { print "I speak!\n"; } 1; ---------------------------------------------------------------------- Mouse.pm package Mouse; use Animal; @ISA = qw(Animal); @EXPORT = qw(speak sound); sub sound { print "the sound!\n"; }; 1; ------------------------------------------------------------------------ farm.pl use Mouse; speak; sound; C:\Documents and Settings\jackm\usetest>farm.pl I speak! the sound! but when I change Mouse.pm to replace "use Animal and set @ISA" with use base, it won't work. ---------------------------------------------------------------------- Mouse.pm package Mouse; use base qw(Animal); @EXPORT = qw(speak sound); sub sound { print "the sound!\n"; }; 1; C:\Documents and Settings\jackm\usetest>farm.pl Can't call method "sound" on an undefined value at Animal.pm line 10. Please someone kindly let me know why? Thank you very much in advance. I'm using; C:\Documents and Settings\jackm\usetest>perl -v This is perl, v5.8.8 built for MSWin32-x86-multi-thread (with 50 registered patches, see perl -V for more detail) Copyright 1987-2006, Larry Wall Binary build 820 [274739] provided by ActiveState http://www.ActiveState.com<http://www.activestate.com/> Built Jan 23 2007 15:57:46 Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl". If you have access to the Internet, point your browser at http://www.perl.org/, the Perl Home Page. wirh Windows XP SP2. Thank you ! -- jackm