Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Perl inheritance

by 2teez (Vicar)
on Apr 18, 2014 at 18:45 UTC ( [id://1082806]=note: print w/replies, xml ) Need Help??


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!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1082806]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2024-04-24 04:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found