I have a set of subroutines that look like this:
sub foo_1($) { my $name = shift; my $f; run_something(); open($f, $name) or die (\"Couldn\'t open $nam
You want the & prototype.
&
sub foo(&@) { my ($callback) = shift; ... $callback->(...); ... }
makes
foo { ... } ...;
equivalent to
foo(sub { ... }, ...);