in reply to Re: Re: Declaring a code ref with arguments
in thread Declaring a code ref with arguments

no, at all, if you look carefully at what he posted you'll find this:
%hash = {no_arg => \&print_me, with_arg => \&print_me("Hello World, again!\n" };
as you can see he uses curly brackets to build a hash and lacks right parenthesis just after "Hello World, again!\n"
what i say is that this code will never work (maybe is just a wrong trascription) and that you can't do
bar =>\&do_bar("argument")
so you have to do
bar => sub { do_bar("argument") }
that's all..
update of course (foo => \&foo) with no arguments is perfectly legal..