Question:

What will be the output of the code below?

package A;

sub new {
    my $class = shift;
    return bless {}, $class;
}

 
package B;
use base 'A';

sub foo {
    return 'blah';
}


package main;

my $obj = B->new();

print $obj->foo(), "\n";

Answers:


Keywords:

© 2017 QuizBucket.org