sub call_twice { my $func = shift; &$func("first"); $func->("second"); } sub foo { print "foo: @_\n" } call_twice(\&foo); call_twice(sub { print "bar: @_\n" });