in reply to Re: Referencing methods
in thread Referencing methods

That's great except it doesn't pass the parameters down. So perhaps this instead:

iterate(sub { $rep->attach(@_) }, @param);

Also, you may wish to give iterate an appropriate prototype, making the sub keyword unnecessary:

sub iterate (&@); iterate { $rep->attach(@_) }, @param;

Share & Enjoy!

    -- Chip Salzenberg, Free-Floating Agent of Chaos