My Perl Quiz

The ultimate place to learn Perl!

Question #37: Which messages will be printed in the code below?

package A;

sub NEW {
    print "hello world!\n";
    return bless {};
};

sub DESTROY {
    print "goodbye world!\n";
};


package main;

my $obj = A::NEW();