sub new { my $class = shift; my $string = "Hello!\n"; return bless( sub { print $string }, $class ); }