in reply to Re: Declaring a code ref with arguments
in thread Declaring a code ref with arguments
His argument passing is wrong but it sounds like you are saying that this:
my %hash = ( foo =>\&do_foo, bar =>\&do_bar, );
is wrong, (correct me if I'm misinterpreting your post) which I'm not sure where you find that in perlref as that works, even while using strict. To pass the arguments you can do this:
Lobster Aliens Are attacking the world!$hash{foo}->('foo','bar','baz');
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Declaring a code ref with arguments
by cianoz (Friar) on Aug 05, 2003 at 14:55 UTC |