in reply to [Resolved]Perl inheritance

From what I gathered it's supposed to print "I am a duck" but it does nothing at all.

And if you write this:

my $an = Duck->new; $an->speak;
with the code you presented, does it print out what you want?

If you tell me, I'll forget.
If you show me, I'll remember.
if you involve me, I'll understand.
--- Author unknown to me

Replies are listed 'Best First'.
Re^2: Perl inheritance
by ivanovic3001 (Initiate) on Apr 18, 2014 at 20:57 UTC

    Wow i feel so ridiculous now. Yeah it's printing it out correctly. thanks alot this makes so much more sense now thanks to everyone for explaining it.

      Think nothing of it.   We all feel ridiculous ... in fact, we all do so, very frequently!   :-D   The digital computer is like that.   Guess that’s why we’re all Meditating here.

      Yeah, as usual, Monty Python illustrated it best ...

        My experience is that if you don't feel downright stupid at least once a day, you're not actually programming!