in reply to Arguments to anonymous subs
That won't pass any args to bar(). However, if you write it like this, it will pass all args.sub foo { $_[0]->() } sub bar { # Do stuff here } foo(\&bar(), stuff);
sub foo { my $func = shift; $func->(@_); }
------
We are the carpenters and bricklayers of the Information Age.
Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.
|
|---|