|
|
| Perl Monk, Perl Meditation | |
| PerlMonks |
Re: How To Call An Anonymous Subroutine?by runrig (Abbot) |
| on Apr 25, 2012 at 18:07 UTC ( #967133=note: print w/ replies, xml ) | Need Help?? |
|
You invoke an anonymous sub with ->(). Your sub would be invoked with $new_resolvers{"dns-extern"}[0]->($ip_address). The way you have your loop written, you'll have to tell the difference between a scalar and a sub though. You could rewrite the loop as: I don't know where $ip is supposed to come from, but that's the way you have your anonymous sub written.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||