sub mysort(&@) { my $code_ref = shift; ... } mysort { ... } ... # Same as: mysort(sub { ... }, ...)