http://qs321.pair.com?node_id=604504


in reply to How to implement closures in Package

Hi,

You're just missing the assignment to $self in greet():

sub greet { my($self, $grt) = @_; return sub { my($subject)= @_; print "$grt $subject \n"; }; }
This should then work as you expect.

Cheers,

Tim