No such thing as a small change | |
PerlMonks |
Re: Passing references to subroutines with parametersby lhoward (Vicar) |
on Jul 12, 2001 at 22:21 UTC ( [id://96138]=note: print w/replies, xml ) | Need Help?? |
You can do this by changing your call slightly and creating an anonymous subroutine:
Effectively, you're creating a new (anonymous) subroutine that calls sub_to_be_passed with the first argument already filled in and the others coming from what is passed to the anonymous subroutine when it is called.
In Section
Seekers of Perl Wisdom
|
|