Hi Monks,
I want the following code to print out 'son', but it prints out 'parent':
my $obj = Son->new; print $obj->call; package Parent; sub call {char()} sub char {'parent'} package Son; use base 'Parent'; sub new {return bless {}, 'Parent'}; sub char {'son'}
How do you make my dream come true, without putting 'call' subroutine in 'Son' package newly?
Thank you!In reply to How to do this? by ryo0ka
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |